home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Interfaces / CIncludes / OCEAuthDir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-10  |  126.7 KB  |  3,325 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Friday, June 4, 1993 at 10:05AM
  4.  OCEAuthDir.h
  5.  C Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1990-1993
  8.   All rights reserved
  9.  
  10. ************************************************************/
  11.  
  12.  
  13. #ifndef __OCEAUTHDIR__
  14. #define __OCEAUTHDIR__
  15.  
  16. #ifndef __APPLETALK__
  17. #include <AppleTalk.h>
  18. #endif
  19.  
  20. #ifndef __FILES__
  21. #include <Files.h>
  22. #endif
  23.  
  24. #ifndef __OCE__
  25. #include <OCE.h>
  26. #endif
  27.  
  28. #ifndef __OSUTILS__
  29. #include <OSUtils.h>
  30. #endif
  31.  
  32.  
  33. #ifndef __TYPES__
  34. #include <Types.h>
  35. #endif
  36.  
  37.  
  38.  
  39.  
  40. /*****************************************************************************/
  41.  
  42. enum {
  43.     kRC4KeySizeInBytes    = 8,        /* size of an RC4 key */
  44.     kRefNumUnknown        = 0
  45. };
  46.  
  47. enum {
  48.     kEnumDistinguishedNameBit,
  49.     kEnumAliasBit,
  50.     kEnumPseudonymBit,
  51.     kEnumDNodeBit,
  52.     kEnumInvisibleBit
  53. };
  54.  
  55. /* Values of DirEnumChoices */
  56. enum {
  57.     kEnumDistinguishedNameMask    = 1L<<kEnumDistinguishedNameBit,
  58.     kEnumAliasMask                = 1L<<kEnumAliasBit,
  59.     kEnumPseudonymMask            = 1L<<kEnumPseudonymBit,
  60.     kEnumDNodeMask                = 1L<<kEnumDNodeBit,
  61.     kEnumInvisibleMask            = 1L<<kEnumInvisibleBit
  62.  
  63. };
  64. #define kEnumAllMask (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  65.  
  66. typedef unsigned long DirEnumChoices;
  67.  
  68.  
  69. /* Values of DirSortOption */
  70. enum {
  71.     kSortByName        = 0,
  72.     kSortByType        = 1
  73. };
  74.  
  75.  
  76. /* Values of DirSortDirection */
  77. enum {
  78.     kSortForwards    = 0,
  79.     kSortBackwards    = 1
  80. };
  81.  
  82. /* Values of DirMatchWith */
  83. enum {
  84.     kMatchAll,
  85.     kExactMatch,
  86.     kBeginsWith,
  87.     kEndingWith,
  88.     kContaining
  89. };
  90.  
  91. typedef unsigned char DirMatchWith;
  92.  
  93.  
  94. #define kCurrentOCESortVersion        1
  95.  
  96. /*  Access controls are implemented on three levels:
  97.  *      DNode, Record, and Attribute Type levels
  98.  *  Some access control bits apply to the container itself, and some apply to its contents.
  99.  *
  100.  *  The Catalog Toolbox supports six functions.  These calls are:
  101.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  102.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  103.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  104.  * 
  105.  *  The GetXXXAccessControl calls will return access control masks for various categories
  106.  *  of users.  Please refer to the access control document for a description of the
  107.  *  categories of users.  In general these are:
  108.  *      ThisRecordOwner         - means the identity of the record itself
  109.  *      Friends                  - means any one of the assigned friends for the record
  110.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  111.  *          in the DNode in which this record is located
  112.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  113.  *      Guest                      - means an unauthenticated user.
  114.  *  Bit masks for various permitted access controls are defined below.
  115.  *
  116.  *  GetXXXAccessControl calls will return access control masks for various categories of
  117.  *  users for this record. In addition they also return the level of access controls
  118.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  119.  *  record, or attribute type.
  120.  *
  121.  *  For records, the access control granted will be minimum of the DNode access
  122.  *  control and record access control masks.  For example, to add an attribute type to a
  123.  *  record, a user must have access control kCreateAttributeTypes at the record and
  124.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  125.  *  minimum of the DNode, record, and attribute type access controls.
  126.  *
  127.  *  
  128.  */  
  129.  
  130. /* access categories bit numbers */
  131. enum {
  132.     kThisRecordOwnerBit                = 0,
  133.     kFriendsBit                        = 1,
  134.     kAuthenticatedInDNodeBit        = 2,
  135.     kAuthenticatedInDirectoryBit    = 3,
  136.     kGuestBit                        = 4,
  137.     kMeBit                            = 5
  138. };
  139.  
  140. /* Values of CategoryMask */
  141. enum {
  142.     kThisRecordOwnerMask            = (1L << kThisRecordOwnerBit),
  143.     kFriendsMask                     = (1L << kFriendsBit),
  144.     kAuthenticatedInDNodeMask          = (1L << kAuthenticatedInDNodeBit),
  145.     kAuthenticatedInDirectoryMask    = (1L << kAuthenticatedInDirectoryBit),
  146.     kGuestMask                        = (1L << kGuestBit),
  147.     kMeMask                            = (1L << kMeBit)
  148. };
  149.  
  150. /* access privileges bit numbers */
  151. enum {
  152.     kSeeBit            = 0,
  153.     kAddBit            = 1,
  154.     kDeleteBit        = 2,
  155.     kChangeBit        = 3,
  156.     kRenameBit        = 4,
  157.     kChangePrivsBit    = 5,
  158.     kSeeFoldersBit    = 6
  159. };
  160.  
  161. /* Values of AccessMask */
  162. enum {
  163.     kSeeMask            = (1L << kSeeBit),
  164.     kAddMask            = (1L << kAddBit),
  165.     kDeleteMask            = (1L << kDeleteBit),
  166.     kChangeMask            = (1L << kChangeBit),
  167.     kRenameMask            = (1L << kRenameBit),
  168.     kChangePrivsMask    = (1L << kChangePrivsBit),
  169.     kSeeFoldersMask        = (1L << kSeeFoldersBit)
  170. };
  171.  
  172. enum {
  173.     kAllPrivs    = (kSeeMask+kAddMask+kDeleteMask+kChangeMask+kRenameMask+kChangePrivsMask+kSeeFoldersMask),
  174.     kNoPrivs    = 0        
  175. };
  176.  
  177. /*
  178.  
  179. kSupportsDNodeNumberBit:
  180. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  181. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  182. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  183. later case DNodeNumber component inside record location info must be set to zero.
  184.  
  185. kSupportsRecordCreationIDBit:
  186. If this bit is set, a record can be referenced by specifying CreationID 
  187. in most catalog manager calls. If this bit is not set recordName and recordType are 
  188. required in the recordID specification for all catalog manager calls.
  189.  
  190. kSupportsAttributeCreationIDBit:
  191. If this bit is set, an attribute value can be obtained by specifying it's 
  192. CreationID in Lookup call staring point and also can be used in operations 
  193. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  194. specified by AttributeType and CreationID.
  195.  
  196. *************************************************************************
  197. Implicit assumption with creationID's and dNodeNumbers are, when supported
  198. they are persistent and will preserved across boots and life of the system.
  199. *************************************************************************
  200.  
  201. Following three bits are for determining the sort order in enumeration.
  202. kSupportsMatchAllBit:
  203. If this bit is set, enumeration of all the records is supported
  204.  
  205. kSupportsBeginsWithBit:
  206. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  207. is supported
  208.  
  209. kSupportsExactMatchBit:
  210. If this bit is set, existence of a record matching exact matchNameString and recordType
  211. is supported.
  212.  
  213. kSupportsEndsWithBit:
  214. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  215. is supported.
  216.  
  217. kSupportsContainsBit:
  218. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  219. is supported
  220.  
  221.  
  222. Implicit assumption in all these is, a record type can be specified either as one of the above or
  223. a type list(more then one) to match exact type.
  224. The Following four bits will indicate sort ordering in enumeration.
  225.  
  226. kSupportsOrderedEnumerationBit:
  227. If this bit is set, Enumerated records or in some order possibly in name order.
  228.  
  229. kCanSupportNameOrderBit:
  230. If this is set, catalog will support sortbyName option in Enumerate.
  231.  
  232. kCanSupportTypeOrderBit:
  233. If this bit is set, catalog will support sortbyType option in enumearte.
  234.  
  235. kSupportSortBackwardsBit:
  236. If this bit is set, catalog supports backward sorting.
  237.  
  238. kSupportIndexRatioBit:
  239. If this bit is set, it indicates that enumeration will return approximate position
  240. of a record (percentile) among all records.
  241.  
  242. kSupportsEnumerationContinueBit:
  243. If this bit is set, catalog supports enumeration continue.
  244.  
  245. kSupportsLookupContinueBit:
  246. If this bit is set, catalog supports lookup continue.
  247.  
  248. kSupportsEnumerateAttributeTypeContinueBit:
  249. If this bit is set, catalog supports EnumerateAttributeType continue.
  250.  
  251. kSupportsEnumeratePseudonymContinueBit:
  252. If this bit is set, catalog supports EnumeratePseudonym continue.
  253.  
  254. kSupportsAliasesBit:
  255. If this bit is set, catalog supports create/delte/enumerate 
  256. of Alias Records.
  257.  
  258. kSupportPseudonymBit: 
  259. If this bit is set, catalog supports create/delte/enumerate of 
  260. pseudonyms for a record.
  261.  
  262. kSupportsPartialPathNameBit:
  263. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  264. intermediate DNode and a partial name starting from that DNode to the intended 
  265. DNode.
  266.  
  267. kSupportsAuthenticationBit:
  268. If this bit is set, catalog supports authentication manager calls.
  269.  
  270. kSupportsProxiesBit:
  271. If this bit is set, catalog supports proxy related calls in authentication manager. 
  272.  
  273. kSupportsFindRecordBit:
  274. If this bit is set, catalog supports find record call.
  275.  
  276. Bits and corresponding masks are as defined below.
  277. */
  278.  
  279. enum {
  280.     kSupportsDNodeNumberBit                          = 0,
  281.     kSupportsRecordCreationIDBit                  = 1,
  282.        kSupportsAttributeCreationIDBit                  = 2,
  283.     kSupportsMatchAllBit                            = 3,
  284.     kSupportsBeginsWithBit                           = 4,
  285.      kSupportsExactMatchBit                          = 5,
  286.     kSupportsEndsWithBit                          = 6,
  287.      kSupportsContainsBit                          = 7,
  288.     kSupportsOrderedEnumerationBit                  = 8,
  289.     kCanSupportNameOrderBit                          = 9,
  290.     kCanSupportTypeOrderBit                          = 10,
  291.     kSupportSortBackwardsBit                      = 11,
  292.     kSupportIndexRatioBit                           = 12,    
  293.     kSupportsEnumerationContinueBit                  = 13,
  294.     kSupportsLookupContinueBit                      = 14,
  295.     kSupportsEnumerateAttributeTypeContinueBit    = 15,
  296.     kSupportsEnumeratePseudonymContinueBit        = 16,
  297.     kSupportsAliasesBit                              = 17,
  298.     kSupportsPseudonymsBit                          = 18,
  299.     kSupportsPartialPathNamesBit                  = 19,
  300.     kSupportsAuthenticationBit                      = 20,
  301.     kSupportsProxiesBit                              = 21,
  302.     kSupportsFindRecordBit                          = 22
  303. };
  304.  
  305. /* values of DirGestalt */
  306. enum {
  307.     kSupportsDNodeNumberMask                        = 1L<<kSupportsDNodeNumberBit,
  308.     kSupportsRecordCreationIDMask                    = 1L<<kSupportsRecordCreationIDBit,
  309.      kSupportsAttributeCreationIDMask                  = 1L<<kSupportsAttributeCreationIDBit,
  310.     kSupportsMatchAllMask                               = 1L<<kSupportsMatchAllBit,
  311.     kSupportsBeginsWithMask                         = 1L<<kSupportsBeginsWithBit,
  312.      kSupportsExactMatchMask                               = 1L<<kSupportsExactMatchBit,
  313.      kSupportsEndsWithMask                               = 1L<<kSupportsEndsWithBit,
  314.      kSupportsContainsMask                               = 1L<<kSupportsContainsBit,
  315.     kSupportsOrderedEnumerationMask                    = 1L<<kSupportsOrderedEnumerationBit,
  316.     kCanSupportNameOrderMask                        = 1L<<kCanSupportNameOrderBit,
  317.     kCanSupportTypeOrderMask                        = 1L<<kCanSupportTypeOrderBit,
  318.     kSupportSortBackwardsMask                        = 1L<<kSupportSortBackwardsBit,
  319.     kSupportIndexRatioMask                            = 1L<<kSupportIndexRatioBit,
  320.     kSupportsEnumerationContinueMask                = 1L<<kSupportsEnumerationContinueBit,
  321.     kSupportsLookupContinueMask                        = 1L<<kSupportsLookupContinueBit,
  322.     kSupportsEnumerateAttributeTypeContinueMask        = 1L<<kSupportsEnumerateAttributeTypeContinueBit,
  323.     kSupportsEnumeratePseudonymContinueMask            = 1L<<kSupportsEnumeratePseudonymContinueBit,
  324.     kSupportsAliasesMask                            = 1L<<kSupportsAliasesBit,
  325.     kSupportsPseudonymsMask                            = 1L<<kSupportsPseudonymsBit,
  326.     kSupportsPartialPathNamesMask                    = 1L<<kSupportsPartialPathNamesBit,
  327.     kSupportsAuthenticationMask                        = 1L<<kSupportsAuthenticationBit,
  328.     kSupportsProxiesMask                            = 1L<<kSupportsProxiesBit,
  329.     kSupportsFindRecordMask                            = 1L<<kSupportsFindRecordBit
  330. };
  331.  
  332.  
  333. /* Values of AuthLocalIdentityOp */
  334.  
  335. enum {
  336.     kAuthLockLocalIdentityOp        = 1,
  337.     kAuthUnlockLocalIdentityOp        = 2,
  338.     kAuthLocalIdentityNameChangeOp    = 3
  339. };
  340.  
  341. /* Values of AuthLocalIdentityLockAction */
  342. enum {
  343.     kAuthLockPending            = 1,
  344.     kAuthLockWillBeDone            = 2
  345. };
  346.  
  347.  
  348. /* Values of AuthNotifications */
  349. enum {kNotifyLockBit, kNotifyUnlockBit, kNotifyNameChangeBit};
  350.  
  351. enum {
  352.     kNotifyLockMask            = 1L<<kNotifyLockBit,
  353.     kNotifyUnlockMask        = 1L<<kNotifyUnlockBit,
  354.     kNotifyNameChangeMask    = 1L<<kNotifyNameChangeBit};
  355.  
  356.  
  357. enum {
  358.     kPersonalDirectoryFileCreator    = 'kl03',
  359.     kPersonalDirectoryFileType        = 'pabt',
  360.     kBusinessCardFileType            = 'bust',
  361.     kDirectoryFileType                = 'dirt',
  362.     kDNodeFileType                    = 'dnod',
  363.     kDirsRootFileType                = 'drtt',
  364.     kRecordFileType                    = 'rcrd'    
  365. };
  366.  
  367. typedef unsigned short DirSortOption;
  368.  
  369. typedef unsigned short DirSortDirection;
  370.  
  371. typedef unsigned long CategoryMask;
  372.  
  373. typedef unsigned long AccessMask;
  374.  
  375. typedef unsigned long DirGestalt;
  376.  
  377. typedef unsigned long AuthLocalIdentityOp;
  378.  
  379. typedef unsigned long AuthLocalIdentityLockAction;
  380.  
  381. typedef unsigned long AuthNotifications;
  382.  
  383. struct DNodeID {
  384.     DNodeNum   dNodeNumber;    /* dNodenumber  */
  385.     long       reserved1;  
  386.     RStringPtr name;
  387.     long       reserved2;
  388. };
  389.  
  390. typedef struct DNodeID DNodeID;
  391.  
  392.  
  393. struct DirEnumSpec {
  394.     DirEnumChoices    enumFlag;
  395.     unsigned short indexRatio;             /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  396.     union {
  397.         LocalRecordID    recordIdentifier;
  398.         DNodeID            dNodeIdentifier;
  399.     }u;
  400. };
  401.  
  402. typedef struct DirEnumSpec DirEnumSpec;
  403.  
  404. struct DirMetaInfo {
  405.     unsigned long        info[4];
  406. };
  407.  
  408. typedef struct DirMetaInfo DirMetaInfo;
  409.  
  410. struct SLRV {
  411.     ScriptCode            script;         /*   Script code in which entries are sorted */
  412.     short                language;       /*   Language code in which entries are sorted */
  413.     short                regionCode;     /*   Region code in which entries are sorted */
  414.     short                version;        /*  version of oce sorting software */
  415. };
  416.  
  417. typedef struct SLRV SLRV;
  418.  
  419. /* Catalog types and operations */
  420.  
  421. typedef unsigned long AuthIdentity;        /* unique identifier for an identity */
  422. typedef AuthIdentity LocalIdentity;        /* Umbrella LocalIdentity */
  423.  
  424.  
  425. struct DESKey {                            /* A DES key is 8 bytes of data */
  426.     unsigned long a;
  427.     unsigned long b;
  428. };
  429.  
  430. typedef struct DESKey DESKey;
  431.  
  432.  
  433. typedef Byte RC4Key[kRC4KeySizeInBytes];
  434.  
  435. typedef unsigned long    AuthKeyType;
  436.  
  437. struct AuthKey {                        /* key type followed by its data */
  438.     AuthKeyType    keyType;
  439.     union {
  440.         DESKey    des;
  441.         RC4Key    rc4;
  442.     }u;
  443. };
  444.  
  445. typedef struct AuthKey AuthKey;
  446. typedef AuthKey *AuthKeyPtr;
  447.  
  448.  
  449.  
  450. /*
  451. This header is common to all the parameter blocks.  Clients should not directly
  452. touch any of these fields except ioCompletion.  ioCompletion is the
  453. completion routine pointer for async calls; it is ignored for sync calls.
  454. ioResult is the result code from the call.
  455. */
  456.  
  457. #define AuthDirParamHeader                \
  458.     Ptr                    qLink;            \
  459.     long                reserved1;        \
  460.     long                reserved2;        \
  461.     ProcPtr                ioCompletion;    \
  462.     OSErr                ioResult;        \
  463.     unsigned long        saveA5;            \
  464.     short                reqCode;        \
  465.     long                reserved[2];    \
  466.     AddrBlock            serverHint;        \
  467.     short                dsRefNum;        \
  468.     unsigned long        callID;            \
  469.     AuthIdentity        identity;        \
  470.     long                gReserved1;        \
  471.     long                gReserved2;        \
  472.     long                gReserved3;        \
  473.     long                clientData;
  474. /*****************************************************************************
  475.  
  476.  
  477.         Authentication Manager operations 
  478.  
  479. *****************************************************************************/
  480. /*
  481. kAuthResolveCreationID:
  482. userRecord will contain the user information whose creationID has to be
  483. returned. A client must make this call when he does not know the creaitionID.
  484. The creationID must be set to nil before making the call. The server will attempt
  485. to match the recordid's in the data base which match the user name and
  486. type in the record.  Depending on number of matchings, following
  487. results will be returned.
  488. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  489. totalMatches = actualMatches = 1.
  490. > 1 Match:
  491.     Buffer is Large Enough:
  492.     totalMatches = actualMatches
  493.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  494. > 1 Match:
  495.     Buffer is not Large Enough:
  496.     totalMatches > actualMatches
  497.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  498. 0 Matches:
  499.  kOCENoSuchRecord error
  500. */
  501.  
  502. struct AuthResolveCreationIDPB {
  503.     AuthDirParamHeader
  504.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  505.     unsigned long    bufferLength;        /*  --> Buffer Size to hold duplicate Info */
  506.     Ptr                buffer;                /*  --> Buffer  to hold duplicate Info */
  507.     unsigned long    totalMatches;        /* <--  Total Number of matching names found */
  508.     unsigned long    actualMatches;        /* <--  Number of matches returned in the buffer */
  509. };
  510.  
  511. typedef struct AuthResolveCreationIDPB AuthResolveCreationIDPB;
  512.  
  513. /*
  514. kAuthBindSpecificIdentity:
  515. userRecord will contain the user information whose identity has to be
  516. verified. userKey will contain the userKey. An Identity is returned which
  517. binds the key and the userRecord. The identity returned can be used in the 'identity'
  518. field in the header portion (AuthDirParamHeader) for authenticating the Catalog and
  519. Authentication manager calls.
  520. */
  521.  
  522. struct AuthBindSpecificIdentityPB {
  523.     AuthDirParamHeader
  524.     AuthIdentity    userIdentity;        /* <--  binding identity */
  525.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  526.     AuthKeyPtr        userKey;            /*  --> OCE Key for the user */
  527. };
  528.  
  529. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  530.  
  531. /*
  532. kAuthUnbindSpecificIdentity:
  533. This call will unbind the userRecord and key which were bind earlier.
  534. */
  535.  
  536. struct AuthUnbindSpecificIdentityPB {
  537.     AuthDirParamHeader
  538.     AuthIdentity    userIdentity;        /*  --> identity to be deleted */
  539. };
  540.  
  541. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  542.  
  543.  
  544. /*
  545. kAuthGetSpecificIdentityInfo:
  546. This call will return the userRecord for the given identity. Note: key is not
  547. returned because this would compromise security.
  548. */
  549.  
  550. struct AuthGetSpecificIdentityInfoPB {
  551.     AuthDirParamHeader
  552.     AuthIdentity    userIdentity;        /*  --> identity of initiator */
  553.     RecordIDPtr        userRecord;            /* <--  OCE name(Record) of the user */
  554. };
  555.  
  556. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  557.  
  558.  
  559. /*
  560. kAuthAddKey:
  561. userRecord will contain the user information whose identity has to be
  562. created. userKey will point to the key to be created. password points to
  563. an RString containing the password used to generate the key.
  564. */
  565.  
  566. struct AuthAddKeyPB {
  567.     AuthDirParamHeader
  568.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  569.     AuthKeyPtr        userKey;            /* <--  OCE Key for the user */
  570.     RStringPtr        password;            /*  --> Pointer to password string */
  571. };
  572.  
  573. typedef struct AuthAddKeyPB AuthAddKeyPB;
  574.  
  575. /*
  576. kAuthChangeKey:
  577. userRecord will contain the user information whose identity has to be
  578. created. userKey will point to the key to be created. password points to
  579. an RString containing the password used to generate the key.
  580. */
  581.  
  582. struct AuthChangeKeyPB {
  583.     AuthDirParamHeader
  584.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  585.     AuthKeyPtr        userKey;            /* <--  New OCE Key for the user */
  586.     RStringPtr        password;            /*  -->Pointer to the new password string */
  587. };
  588.  
  589. typedef struct AuthChangeKeyPB AuthChangeKeyPB;
  590.  
  591. /*
  592. AuthDeleteKey:
  593. userRecord will contain the user information whose Key has to be deleted.
  594. */
  595.  
  596. struct AuthDeleteKeyPB {
  597.     AuthDirParamHeader
  598.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  599. };
  600.  
  601. typedef struct AuthDeleteKeyPB AuthDeleteKeyPB;
  602.  
  603. /* AuthPasswordToKey: Converts an RString into a key. */
  604.  
  605. struct AuthPasswordToKeyPB {
  606.     AuthDirParamHeader
  607.     RecordIDPtr        userRecord;            /*  --> OCE name(Record) of the user */
  608.     AuthKeyPtr        key;                /* <--  */
  609.     RStringPtr        password;            /*  -->Pointer to the new password string */
  610. };
  611.  
  612. typedef struct AuthPasswordToKeyPB AuthPasswordToKeyPB;
  613.  
  614. /*
  615. kAuthGetCredentials:
  616. userRecord will contain the user information whose identity has to be
  617. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  618. be deleted.
  619. */
  620.  
  621. struct AuthGetCredentialsPB {
  622.     AuthDirParamHeader
  623.     AuthIdentity    userIdentity;        /*  --> identity of initiator */
  624.     RecordIDPtr        recipient;            /*  --> OCE name of recipient */
  625.     AuthKeyPtr        sessionKey;            /* <--  session key */
  626.     UTCTime            expiry;                /* <--> desired/actual expiry */
  627.     unsigned long    credentialsLength;    /* <--> max/actual credentials size */
  628.     Ptr                credentials;        /* <--  buffer where credentials are returned */
  629. };
  630.  
  631. typedef struct AuthGetCredentialsPB AuthGetCredentialsPB;
  632.  
  633. /*
  634. AuthDecryptCredentialsPB:
  635. Changes:
  636. userKey is changed userIdentity.
  637. userRecord is changed to initiatorRecord. User must supply buffer
  638. to hold initiatorRecord.
  639. agentList has changed to agent. There wil be no call back.
  640. User must supply buffer to hold agent Record.
  641. An additional boolean parameter 'hasAgent' is included.
  642. Toolbox will set this if an 'Agent' record is found in the
  643. credentials. If RecordIDPtr is 'nil', no agent record will
  644. be copied. However user can examine 'hasAgent', If true user
  645. can reissue this call with apprpriate buffer for getting a recordID.
  646. agent has changed to intermediary.  User must supply buffer to hold 
  647. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  648. 'intermediary' record is found in the credentials. 
  649. */
  650.  
  651. struct AuthDecryptCredentialsPB {
  652.     AuthDirParamHeader
  653.     AuthIdentity    userIdentity;        /*  --> user's Identity */
  654.     RecordIDPtr        initiatorRecord;    /* <--  OCE name of the initiator */
  655.     AuthKeyPtr        sessionKey;            /* <--  session key */
  656.     UTCTime            expiry;                /* <--  credentials expiry time */
  657.     unsigned long    credentialsLength;    /*  --> actual credentials size */
  658.     Ptr                credentials;        /*  --> credentials to be decrypted */
  659.     UTCTime            issueTime;            /* <--  credentials expiry time */
  660.     Boolean            hasIntermediary;    /* <--  if true, An intermediary Record was found in credentials */
  661.     RecordIDPtr        intermediary;        /* <--  recordID of the intermediary */
  662. };
  663.  
  664. typedef struct AuthDecryptCredentialsPB AuthDecryptCredentialsPB;
  665.  
  666.  
  667. struct AuthMakeChallengePB {
  668.     AuthDirParamHeader
  669.     AuthKeyPtr        key;                    /*  --> UnEncrypted SessionKey */
  670.     Ptr                challenge;                /* <--  Encrypted Challenge */
  671.     unsigned long    challengeBufferLength;    /*  ->length of challenge buffer */
  672.     unsigned long    challengeLength;        /*  <-length of Encrypted Challenge */
  673. };
  674.  
  675. typedef struct AuthMakeChallengePB AuthMakeChallengePB;
  676.  
  677. struct AuthMakeReplyPB {
  678.     AuthDirParamHeader
  679.     AuthKeyPtr        key;                /*  --> UnEncrypted SessionKey */
  680.     Ptr                challenge;            /*  --> Encrypted Challenge */
  681.     Ptr                reply;                /* <--  Encrypted Reply */
  682.     unsigned long    replyBufferLength;    /*  -->length of challenge buffer */
  683.     unsigned long    challengeLength;    /*  --> length of Encrypted Challenge */
  684.     unsigned long    replyLength;        /* <--  length of Encrypted Reply */
  685. };
  686.  
  687. typedef struct AuthMakeReplyPB AuthMakeReplyPB;
  688.  
  689. struct AuthVerifyReplyPB {
  690.     AuthDirParamHeader
  691.     AuthKeyPtr        key;                /*  --> UnEncrypted SessionKey */
  692.     Ptr                challenge;            /*  --> Encrypted Challenge */
  693.     Ptr                reply;                /*  --> Encrypted Reply */
  694.     unsigned long    challengeLength;    /*  --> length of Encrypted Challenge */
  695.     unsigned long    replyLength;        /*  --> length of Encrypted Reply */
  696. };
  697.  
  698. typedef struct AuthVerifyReplyPB AuthVerifyReplyPB;
  699.  
  700.  
  701.  
  702. /*
  703. kAuthGetUTCTime:
  704. RLI will contain a valid RLI for a cluster server.
  705. UTC(GMT) time from one of the cluster server will be returned.
  706. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  707. If RLI is nil Map DA is used to determine UTC(GMT).
  708. Mac Local Time = theUTCTime + theUTCOffset.
  709. */
  710.  
  711. struct AuthGetUTCTimePB {
  712.     AuthDirParamHeader
  713.     PackedRLIPtr    pRLI;                /*  --> packed RLI of the Node, whose server's UTC is requested */
  714.     UTCTime            theUTCTime;            /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  715.     UTCOffset        theUTCOffset;        /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  716. };
  717.  
  718. typedef struct AuthGetUTCTimePB AuthGetUTCTimePB;
  719.  
  720.  
  721. /*
  722. kAuthMakeProxy:
  723. A user represented bu the 'userIdentity' can make a proxy using this call.
  724. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  725. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  726. 'firstValid' is time at which proxy becomes valid.
  727. 'expiry' is the time at which proxy must expire.
  728. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  729. When the call completes, it will hold the actual length of proxy. If the
  730. call completes 'kOCEMoreData' error, client can reissue the call with the
  731. buffer size as 'proxyLength' returned.
  732. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  733. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  734. for the server using TradeProxyForCredentials call.
  735. authDataLength and authData are intended for possible future work, but are
  736. ignored for now.
  737. */
  738.  
  739. struct AuthMakeProxyPB {
  740.     AuthDirParamHeader
  741.     AuthIdentity    userIdentity;        /*  --> identity of principal */
  742.     RecordIDPtr        recipient;            /*  --> OCE name of recipient */
  743.     UTCTime            firstValid;            /*  --> time at which proxy becomes valid */
  744.     UTCTime            expiry;                /*  --> time at which proxy expires */
  745.     unsigned long    authDataLength;        /*  --> size of authorization data */
  746.     Ptr                authData;            /*  --> pointer to authorization data */
  747.     unsigned long    proxyLength;        /* <--> max/actual proxy size */
  748.     Ptr                proxy;                /* <--> buffer where proxy is returned */
  749.     RecordIDPtr        intermediary;        /*  --> RecordID of intermediary */
  750. };
  751.  
  752. typedef struct AuthMakeProxyPB AuthMakeProxyPB;
  753.  
  754. /*
  755. kAuthTradeProxyForCredentials:
  756. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  757. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  758. 'recipient' is the RecordID for whom credetials are requested.
  759. 'principal' is the RecordID of the user who created the proxy.
  760. 'proxyLength' is the length of data pointed by 'proxy.
  761. If the call is succesfull, credentials will be returned in the
  762. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  763. When call succeds this will have expiry time of credentials.
  764. This is very similar to GetCredentials except that we (of course) need the proxy,
  765. but we also need the name of the principal who created the proxy.
  766. */
  767.  
  768. struct AuthTradeProxyForCredentialsPB {
  769.     AuthDirParamHeader
  770.     AuthIdentity    userIdentity;        /*  --> identity of intermediary */
  771.     RecordIDPtr        recipient;            /*  --> OCE name of recipient */
  772.     AuthKeyPtr        sessionKey;            /* <--  session key */
  773.     UTCTime            expiry;                /* <--> desired/actual expiry */
  774.     unsigned long    credentialsLength;    /* <--> max/actual credentials size */
  775.     Ptr                credentials;        /* <--> buffer where credentials are returned */
  776.     unsigned long    proxyLength;        /*  --> actual proxy size */
  777.     Ptr                proxy;                /*  --> buffer containing proxy */
  778.     RecordIDPtr        principal;            /*  --> RecordID of principal */
  779. };
  780.  
  781. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  782.  
  783. /* API for Local Identity Interface */
  784. /*
  785. AuthGetLocalIdentityPB:
  786. A Collaborative application intended to work under the umbrella of LocalIdentity
  787. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  788. If LocalIdentity has not been setup, then application will get
  789. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  790. recommended by the OCE Setup document and guide the user through OCE Setup.
  791. If the OCESetup contains local identity, but user has not unlocked, it will get
  792. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  793. to prompt user for the password.
  794. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  795. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  796. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  797. when a LocalIdentity gets created by a foreground application.
  798. */
  799.  
  800. struct AuthGetLocalIdentityPB {
  801.     AuthDirParamHeader
  802.     LocalIdentity   theLocalIdentity;    /* <--  LocalIdentity */
  803. };
  804.  
  805. typedef struct AuthGetLocalIdentityPB AuthGetLocalIdentityPB;
  806.  
  807. /*
  808. kAuthUnlockLocalIdentity:
  809. The LocalIdentity can be created using this call.
  810. The userName and password correspond to the LocalIdentity setup.
  811. If the password matches, then collabIdentity will be returned.
  812. Typically SDPPromptForLocalIdentity call will make this call.
  813. All applications which are registered through kAuthAddToLocalIdentityQueue
  814. will be notified.
  815. */
  816.  
  817. struct AuthUnlockLocalIdentityPB {
  818.     AuthDirParamHeader
  819.     LocalIdentity   theLocalIdentity;    /* <--  LocalIdentity */
  820.     RStringPtr        userName;            /*  --> userName */
  821.     RStringPtr        password;            /*  -->user password */
  822. };
  823.  
  824. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  825.  
  826. /*
  827. kAuthLockLocalIdentity:
  828. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  829. call fails with 'kOCEOperationDenied' error, name will contain the application which
  830. denied the operation. This name will be supplied by the application
  831. when it registered through kAuthAddToLocalIdentityQueue call
  832. */
  833.  
  834. struct AuthLockLocalIdentityPB {
  835.     AuthDirParamHeader
  836.     LocalIdentity   theLocalIdentity;    /*  --> LocalIdentity */
  837.     StringPtr        name;                /* <--  name of the app which denied delete */
  838. };
  839.  
  840. typedef struct AuthLockLocalIdentityPB AuthLockLocalIdentityPB;
  841.  
  842.  
  843. typedef pascal Boolean (*NotificationProc) (long clientData, AuthLocalIdentityOp callValue,
  844.             AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  845.  
  846. /*
  847. kAuthAddToLocalIdentityQueue:
  848. An application requiring notification of locking/unlocking of the
  849. LocalIdentity can install itself using this call. The function provided
  850. in 'notifyProc' will be called whenever the requested event happens.
  851. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  852. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  853. a 'true' value. If all the registered entries return 'false' value, locking will be done
  854. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  855. (registered with the notificationProc) of the application which denied locking is also
  856. returned to the caller making the AuthLockIdentity call.
  857. */
  858.  
  859. struct AuthAddToLocalIdentityQueuePB {
  860.     AuthDirParamHeader
  861.     NotificationProc    notifyProc;            /*  --> notification procedure */
  862.     AuthNotifications    notifyFlags;        /*  --> notifyFlags */
  863.     StringPtr            appName;            /*  --> name of application to be returned in Delete/Stop */
  864. };
  865.  
  866. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  867.  
  868. /*
  869. kAuthRemoveFromLocalIdentityQueue:*/
  870.  
  871. struct AuthRemoveFromLocalIdentityQueuePB {
  872.     AuthDirParamHeader
  873.     NotificationProc    notifyProc;            /*  --> notification procedure */
  874. };
  875.  
  876. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  877.  
  878. /*
  879. kAuthSetupLocalIdentity:
  880. The LocalIdentity can be Setup using this call.
  881. The userName and password correspond to the LocalIdentity setup.
  882. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  883. will be returned.
  884. */
  885.  
  886. struct AuthSetupLocalIdentityPB {
  887.     AuthDirParamHeader
  888.     long            aReserved;            /*  --  */
  889.     RStringPtr        userName;            /*  --> userName */
  890.     RStringPtr        password;            /*  -->user password */
  891. };
  892.  
  893. typedef struct AuthSetupLocalIdentityPB AuthSetupLocalIdentityPB;
  894.  
  895. /*
  896. kAuthChangeLocalIdentity:
  897. An existing LocalIdentity  Setup can be changed using this call.
  898. The userName and password correspond to the LocalIdentity setup.
  899. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  900. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  901. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  902. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  903. password as 'newPassword' and if any applications has installed into 
  904. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  905. kAuthLocalIdentityNameChangeOp action value. 
  906.  
  907. */
  908.  
  909. struct AuthChangeLocalIdentityPB {
  910.     AuthDirParamHeader
  911.     long            aReserved;            /*  --  */
  912.     RStringPtr        userName;            /*  --> userName */
  913.     RStringPtr        password;            /*  --> current password */
  914.     RStringPtr        newPassword;        /*  --> new password */
  915. };
  916.  
  917. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  918.  
  919. /*
  920. kAuthRemoveLocalIdentity:
  921. An existing LocalIdentity  Setup can be removed using this call.
  922. The userName and password correspond to the LocalIdentity setup.
  923. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  924. will be returned.
  925. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  926. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  927. This is a very distructive operation, user must be warned enough before actually making
  928. this call.
  929. */
  930.  
  931. struct AuthRemoveLocalIdentityPB {
  932.     AuthDirParamHeader
  933.     long            aReserved;            /*  --  */
  934.     RStringPtr        userName;            /*  --> userName */
  935.     RStringPtr        password;            /*  --> current password */
  936. };
  937.  
  938. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  939.  
  940. /*
  941. kOCESetupAddDirectoryInfo:
  942. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  943. ASCreateLocalIdentity should have been done succesfully before making this call.
  944. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  945. DirAddDSAMDirectory call was made.
  946. rid-> is the recordID in which the identity for the catalog will be established.
  947. password-> the password associated with the rid in the catalog world.
  948. */
  949.  
  950. struct OCESetupAddDirectoryInfoPB {
  951.     AuthDirParamHeader
  952.     CreationID        directoryRecordCID;    /*  --> CreationID for the catalog */
  953.     RecordIDPtr        recordID;            /*  --> recordID for the identity */
  954.     RStringPtr        password;            /*  --> password in the catalog world */
  955. };
  956.  
  957. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  958.  
  959. /*
  960. kOCESetupChangeDirectoryInfo:
  961. Using this call an existing identity for a catalog under LocalIdentity umbrella
  962. can be changed.
  963. ASCreateLocalIdentity should have been done succesfully before making this call.
  964. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  965. DirAddDSAMDirectory call was made.
  966. rid-> is the recordID in which the identity for the catalog will be established.
  967. password-> the password associated with the rid in the catalog world.
  968. newPassword -> the new password for the catalog
  969. */
  970.  
  971. struct OCESetupChangeDirectoryInfoPB {
  972.     AuthDirParamHeader
  973.     CreationID        directoryRecordCID;    /*  --> CreationID for the catalog */
  974.     RecordIDPtr        recordID;            /*  --> recordID for the identity */
  975.     RStringPtr        password;            /*  --> password in the catalog world */
  976.     RStringPtr        newPassword;        /*  --> new password in the catalog */
  977. };
  978.  
  979. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  980.  
  981. /*
  982. kOCESetupRemoveDirectoryInfo:
  983. Using this call an existing identity for a catalog under LocalIdentity umbrella
  984. can be changed.
  985. ASCreateLocalIdentity should have been done succesfully before making this call.
  986. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  987. */
  988.  
  989. struct OCESetupRemoveDirectoryInfoPB {
  990.     AuthDirParamHeader
  991.     CreationID        directoryRecordCID;    /*  --> CreationID for the catalog */
  992. };
  993.  
  994. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  995.  
  996. /*
  997. kOCESetupGetDirectoryInfo:
  998. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  999. can be obtained.
  1000. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1001. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1002. 'password' will be returned  for  non-ADAP Catalogs.
  1003. */
  1004.  
  1005. struct OCESetupGetDirectoryInfoPB {
  1006.     AuthDirParamHeader
  1007.     DirectoryNamePtr    directoryName;    /*  --> catalog name */
  1008.     DirDiscriminator    discriminator;    /*  --> discriminator for the catalog */
  1009.     RecordIDPtr            recordID;        /* <--  rid for the catalog identity */
  1010.     RStringPtr            nativeName;        /* <--  user name in the catalog world */
  1011.     RStringPtr            password;        /* <--  password in the catalog world */
  1012.  
  1013. };
  1014.  
  1015. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1016.  
  1017.  
  1018. /*****************************************************************************
  1019.  
  1020.  
  1021.          Catalog Manager operations
  1022.  
  1023.  
  1024. *****************************************************************************/
  1025.  
  1026.  
  1027. /* AddRecord */
  1028.  
  1029. struct DirAddRecordPB {
  1030.     AuthDirParamHeader
  1031.     RecordIDPtr            aRecord;        /*  --> CreationID returned here */
  1032.     Boolean                allowDuplicate;    /*  --> */
  1033. };
  1034.  
  1035. typedef struct DirAddRecordPB DirAddRecordPB;
  1036.  
  1037.  
  1038.  
  1039. /* DeleteRecord */
  1040.  
  1041. struct DirDeleteRecordPB {
  1042.     AuthDirParamHeader
  1043.     RecordIDPtr            aRecord;        /*  --> */
  1044. };
  1045.  
  1046. typedef struct DirDeleteRecordPB DirDeleteRecordPB;
  1047.  
  1048. /* aRecord must contain valid PackedRLI and a CreationID. */
  1049.  
  1050.  
  1051.  
  1052. /**********************************************************************************/
  1053. /*
  1054. DirEnumerate:
  1055. This call can be used to enumerate both DNodes and records under a specified
  1056. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1057.  
  1058. startingPoint indicates where to start the enumeration.  Initially,
  1059. it should be set to a value of nil.  After some records are enumerated,
  1060. the client can issue the call again with the same aRLI and recordName and
  1061. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1062. will continue the enumeration from that record on. if user wants to get back the
  1063. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1064. must be set to 'true'. If this is set to 'false', records specified after the
  1065. startingPoint record will be returned.
  1066.  
  1067. sortBy indicates to the server to return the records that match in name-first
  1068. or type-first order.  sortDirection indicates to the server to search in forward
  1069. or backward sort order for RecordIDs Specified.
  1070.  
  1071. RecordIDS and Enumeration Criteria:
  1072.  
  1073. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1074. specification.
  1075.  
  1076. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1077. specify a wild card in the name. WildCard specification is specified in 
  1078. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1079.  
  1080. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1081.  
  1082. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1083.  
  1084. If 'typeCount' is exactly equal to one, a wild card can be specified
  1085. for the entity type; otherwise types have to be completely specified.
  1086. WildCard specification is specified in  matchNameHow parameter
  1087.  and possible values are defined in DirMatchWith Enum.
  1088.  
  1089.  
  1090. A nil value for 'startingPoint' is allowed when sortDirection specified
  1091. is 'kSortBackwards'. This was not allowed previously.
  1092.  
  1093. 'enumFlags' parameter is a bit field. The following bits can be set:
  1094.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1095.     kEnumAliasMask to get back record aliases
  1096.     kEnumPseudonymMask to get back record pseudonyms
  1097.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1098.     'aRLI' parameter.
  1099.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1100.     dNode specified in the 'aRLI' parameter.
  1101.  
  1102.     kEnumAll is combination of all five values and can be used to enumerate
  1103.     everything under a specified DNode.
  1104.  
  1105.  
  1106.  
  1107. The results returned for each element will consist of a DirEnumSpec.
  1108. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1109. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1110. The 'enumFlag'  will indicate whether the returned element is a
  1111. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1112. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1113. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1114. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1115. this will be set to zero). The name will be the child dnode name. For other values of the
  1116. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1117. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1118. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1119. may also return the relative position of the record (percentile of total records) in the 
  1120. indexRatio field in EnumSpec.
  1121.  
  1122.  
  1123. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1124. The results will be collected in the 'getBuffer' supplied by the user.
  1125. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1126.  
  1127. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1128. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1129. */
  1130.  
  1131.  
  1132. struct DirEnumerateGetPB {
  1133.     AuthDirParamHeader
  1134.     PackedRLIPtr        aRLI;                    /*  --> an RLI specifying the cluster to be enumerated */
  1135.     DirEnumSpec            *startingPoint;            /*  --> */
  1136.     DirSortOption        sortBy;                    /*  --> */
  1137.     DirSortDirection    sortDirection;            /*  --> */
  1138.     long                dReserved;                /*  --  */
  1139.     RStringPtr            nameMatchString;        /*  --> name from which enumeration should start */
  1140.     RStringPtr            *typesList;                /*  --> list of entity types to be enumerated */
  1141.     unsigned long        typeCount;                /*  --> number of types in the list */
  1142.     DirEnumChoices        enumFlags;                /*  --> indicates what to enumerate */
  1143.     Boolean                includeStartingPoint;    /*  --> if true return the record specified in starting point */
  1144.     Byte                padByte;
  1145.     DirMatchWith        matchNameHow;           /*  --> Matching Criteria for nameMatchString */
  1146.     DirMatchWith        matchTypeHow;           /*  --> Matching Criteria for typeList */
  1147.     Ptr                    getBuffer;                /*  --> */
  1148.     unsigned long        getBufferSize;            /*  --> */
  1149.     SLRV                responseSLRV;            /*  <--  response SLRV */
  1150. };
  1151.  
  1152. typedef struct DirEnumerateGetPB DirEnumerateGetPB;
  1153.  
  1154. /* The EnumerateRecords call-back function is defined as follows: */
  1155. typedef pascal Boolean (*ForEachDirEnumSpec) (long clientData, const DirEnumSpec *enumSpec);
  1156.  
  1157.  
  1158. /*
  1159. EnumerateParse:
  1160. After an EnumerateGet call has completed, call EnumerateParse
  1161. to parse through the buffer that was filled in EnumerateGet.
  1162.  
  1163. 'eachEnumSpec' will be called each time to return to the client a
  1164. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1165. of information returned in the DirEnumSpec
  1166. The clientData parameter that you pass in the parameter block will be passed
  1167. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1168. to allow you some way to match the call-back to the original call (for
  1169. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1170. associate returned results in some way).
  1171.  
  1172. The client should return FALSE from 'eachEnumSpec' to continue
  1173. processing of the EnumerateParse request.  Returning TRUE will
  1174. terminate the EnumerateParse request.
  1175.  
  1176. For synchronous calls, the call-back routine actually runs as part of the same thread
  1177. of execution as the thread that made the EnumerateParse call.  That means that the
  1178. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1179. that were in effect when the call was made.  Because of this, the call-back
  1180. routine has the same restrictions as the caller of EnumerateParse:
  1181. if EnumerateParse was not called from interrupt level, then the call-
  1182. back routine can allocate memory. For asynchronous calls, call-back routine is
  1183. like a ioCompletion except that A5 will be preserved for the application.
  1184. */
  1185.  
  1186. struct DirEnumerateParsePB {
  1187.     AuthDirParamHeader
  1188.     PackedRLIPtr        aRLI;            /*  --> an RLI specifying the cluster to be enumerated */
  1189.     long                bReserved;        /*  --  */
  1190.     long                cReserved;        /*  --  */
  1191.     ForEachDirEnumSpec    eachEnumSpec;    /*  --> */
  1192.     long                eReserved;        /*  --  */
  1193.     long                fReserved;        /*  --  */
  1194.     long                gReserved;        /*  --  */
  1195.     long                hReserved;        /*  --  */
  1196.     long                iReserved;        /*  --  */
  1197.     Ptr                    getBuffer;        /*  --> */
  1198.     unsigned long        getBufferSize;    /*  --> */
  1199.     short                l1Reserved;     /*  -- */
  1200.     short                l2Reserved;     /*  --  */
  1201.     short                l3Reserved;     /*  -- */
  1202.     short                l4Reserved;     /*  --  */
  1203.  
  1204. };
  1205.  
  1206. typedef struct DirEnumerateParsePB DirEnumerateParsePB;
  1207.  
  1208. /*
  1209.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1210.  * of records instead of records local to a cluster.
  1211. */
  1212. struct DirFindRecordGetPB {
  1213.     AuthDirParamHeader
  1214.     RecordIDPtr            startingPoint;
  1215.     long                reservedA[2];
  1216.     RStringPtr            nameMatchString;    
  1217.     RStringPtr            *typesList;                
  1218.     unsigned long        typeCount;                
  1219.     long                reservedB;
  1220.     short                reservedC;
  1221.     DirMatchWith        matchNameHow;           
  1222.     DirMatchWith        matchTypeHow;           
  1223.     Ptr                    getBuffer;                
  1224.     unsigned long        getBufferSize;            
  1225.     DirectoryNamePtr    directoryName;
  1226.     DirDiscriminator    discriminator;
  1227. };
  1228.  
  1229. typedef struct DirFindRecordGetPB DirFindRecordGetPB;
  1230.  
  1231. /* The FindRecordParse call-back function is defined as follows: */
  1232. typedef pascal Boolean (*ForEachRecord)(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1233.  
  1234. /*
  1235.  * This PB same as DirFindRecordGet except it includes the callback function
  1236. */
  1237. struct DirFindRecordParsePB {
  1238.     AuthDirParamHeader
  1239.     RecordIDPtr            startingPoint;
  1240.     long                reservedA[2];
  1241.     RStringPtr            nameMatchString;    
  1242.     RStringPtr            *typesList;                
  1243.     unsigned long        typeCount;                
  1244.     long                reservedB;
  1245.     short                reservedC;
  1246.     DirMatchWith        matchNameHow;           
  1247.     DirMatchWith        matchTypeHow;           
  1248.     Ptr                    getBuffer;                
  1249.     unsigned long        getBufferSize;            
  1250.     DirectoryNamePtr    directoryName;
  1251.     DirDiscriminator    discriminator;
  1252.     ForEachRecord        forEachRecordFunc;        
  1253.  
  1254. };
  1255.  
  1256. typedef struct DirFindRecordParsePB DirFindRecordParsePB;
  1257.  
  1258.  
  1259.  
  1260. /*
  1261. LookupGet:
  1262.  
  1263. aRecordList is an array of pointers to RecordIDs, each of which must
  1264. contain valid PackedRLI and a CreationID.  recordIDCount is
  1265. the size of this array.
  1266.  
  1267. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1268. the size of this array.
  1269.  
  1270. staringRecordIndex is the record from which to continue the lookup.
  1271. If you want to start from first record in the list, this must be 1 (not zero).
  1272. This value must always be <= recordIDCount.
  1273.  
  1274. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1275. If you want to start from first attribute in the list, this must be 1 (not zero).
  1276. This value must always be <= attrTypeCount.
  1277.  
  1278. startingAttribute is the value of the attribute value from which we want to
  1279. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1280. may contain only a CID. Other catalogs may require the entire value.
  1281. If a non-null cid is given and if an attribute value with that cid is not found, this
  1282. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1283. after getting this error.
  1284.  
  1285. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1286. startingPoint in the results returned. If this is set to 'false', the value
  1287. specified in the startingAttribute will not be returned.
  1288.  
  1289. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1290. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1291. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1292. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1293. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1294. so they can be used in a subsequent LookupGet call to continue the lookup.
  1295.  
  1296. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1297. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1298. into the buffer, the client will not able to proceed further because he will not know the
  1299. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1300. would be needed for the next call to get this 'mondo' attribute value successfully.
  1301.  
  1302. to support this, LookupParse call will do the following:
  1303.  
  1304. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1305. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1306. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1307. However, if it was not even called once, then the attribute value may be too big to fit in the
  1308. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1309. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1310. ForEachAttributeValue was not called because the user does not have read access to some of
  1311. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1312. any of the attribute values.  A kOCEMoreData error is returned.
  1313.  
  1314. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1315. 'daDuplicateRecordIDErr'.
  1316.  
  1317. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1318. return 'daDuplicateAttrTypeErr'.
  1319. */
  1320.  
  1321. struct DirLookupGetPB {
  1322.     AuthDirParamHeader
  1323.     RecordIDPtr            *aRecordList;            /*  --> an array of RecordID pointers */
  1324.     AttributeTypePtr    *attrTypeList;            /*  --> an array of attribute types */
  1325.     long                cReserved;                /*  --  */
  1326.     long                dReserved;                /*  --  */
  1327.     long                eReserved;                /*  --  */
  1328.     long                fReserved;                /*  --  */
  1329.     unsigned long        recordIDCount;            /*  --> */
  1330.     unsigned long        attrTypeCount;            /*  --> */
  1331.     Boolean                includeStartingPoint;    /*  --> if true return the value specified by the starting indices */
  1332.     Byte                padByte;
  1333.     short                i1Reserved;                /*  --  */
  1334.     Ptr                    getBuffer;                /*  --> */
  1335.     unsigned long        getBufferSize;            /*  --> */
  1336.     unsigned long        startingRecordIndex;    /*  --> start from this record */
  1337.     unsigned long        startingAttrTypeIndex;    /*  --> start from this attribute type */
  1338.     Attribute            startingAttribute;        /*  --> start from this attribute value */
  1339.     long                pReserved;                /*  --  */
  1340. };
  1341.  
  1342. typedef struct DirLookupGetPB DirLookupGetPB;
  1343.  
  1344. /* The Lookup call-back functions are defined as follows: */
  1345.  
  1346. typedef pascal Boolean (*ForEachLookupRecordID) (long clientData, const RecordID *recordID);
  1347. typedef pascal Boolean (*ForEachAttrTypeLookup) (
  1348.     long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1349. typedef pascal Boolean (*ForEachAttrValue) (long clientData, const Attribute *attribute);
  1350.  
  1351.  
  1352. /*
  1353. LookupParse:
  1354.  
  1355. After a LookupGet call has completed, call LookupParse
  1356. to parse through the buffer that was filled in LookupGet.  The
  1357. toolbox will parse through the buffer and call the appropriate call-back routines
  1358. for each item in the getBuffer.
  1359.  
  1360. 'eachRecordID' will be called each time to return to the client one of the
  1361. RecordIDs from aRecordList.  The clientData parameter that you
  1362. pass in the parameter block will be passed to eachRecordID.
  1363. You are free to put anything in clientData - it is intended to allow
  1364. you some way to match the call-back to the original call (in case, for
  1365. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1366. want to get a call-back for each RecordID (for example, if you're looking up
  1367. attributes for only one RecordID), pass nil for eachRecordID.
  1368.  
  1369. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1370. attribute type (one from attrTypeList) that exists in the record specified
  1371. in the last eachRecordID call.  If you don't want to get a call-back for
  1372. each AttributeType (for example, if you're looking up only one attribute type,
  1373. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1374. call-back routine), pass nil for eachAttrType. However access controls may
  1375. prohibit you from reading some attribute types; in that case eachAttrValue
  1376. may not be called even though the value exists. Hence the client should
  1377. supply this call-back function to see the access controls for each attribute type.
  1378.  
  1379. This will be followed by one or more calls to eachAttrValue, to pass the
  1380. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1381. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1382. the value, and you can process it within the call-back routine.
  1383. After one or more values are returned, eachAttrType may be called again to pass
  1384. another attribute type that exists in the last-specified RecordID.
  1385.  
  1386. The client should return FALSE from eachRecordID, eachAttrType, and
  1387. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1388. from any call-back will terminate the LookupParse request.
  1389.  
  1390. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1391. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1392. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1393. However, if it was not even called once, then the attribute value may be too big to fit in the
  1394. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1395. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1396. ForEachAttributeValue was not called because the user does not have read access to some of
  1397. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1398. any of the attribute values.  A kOCEMoreData error is returned.
  1399.  
  1400. For synchronous calls, the call-back routine actually runs as part of the same thread
  1401. of execution as the thread that made the LookupParse call.  That means that the
  1402. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1403. that were in effect when the call was made.  Because of this, the call-back
  1404. routine has the same restrictions as the caller of LookupParse:
  1405. if LookupParse was not called from interrupt level, then the call-
  1406. back routine can allocate memory. For asynchronous calls, call-back routine is
  1407. like a ioCompletion except that A5 will be preserved for the application.
  1408. */
  1409.  
  1410. struct DirLookupParsePB {
  1411.     AuthDirParamHeader
  1412.     RecordIDPtr *            aRecordList;            /*  --> must be same from the corresponding Get call */
  1413.     AttributeTypePtr *        attrTypeList;            /*  --> must be same from the corresponding Get call */
  1414.     long                    cReserved;                /*  --  */
  1415.     ForEachLookupRecordID    eachRecordID;            /*  --> */
  1416.     ForEachAttrTypeLookup    eachAttrType;            /*  --> */
  1417.     ForEachAttrValue        eachAttrValue;            /*  --> */
  1418.     unsigned long            recordIDCount;            /*  --> must be same from the corresponding Get call */
  1419.     unsigned long            attrTypeCount;            /*  --> must be same from the corresponding Get call */
  1420.     long                    iReserved;                /*  --  */
  1421.     Ptr                        getBuffer;                /*  --> must be same from the corresponding Get call*/
  1422.     unsigned long            getBufferSize;            /*  --> must be same from the corresponding Get call*/
  1423.     unsigned long            lastRecordIndex;        /* <--  last RecordID processed when parse completed */
  1424.     unsigned long            lastAttributeIndex;        /* <--  last Attribute Type processed when parse completed */
  1425.     Attribute                lastAttribute;            /* <--  last attribute value (with this CreationID) processed when parse completed */
  1426.     unsigned long            attrSize;                /* <--  length of the attribute we did not return */
  1427. };
  1428.  
  1429. typedef struct DirLookupParsePB DirLookupParsePB;
  1430.  
  1431.  
  1432.  
  1433. /* AddAttributeValue */
  1434.  
  1435. struct DirAddAttributeValuePB {
  1436.     AuthDirParamHeader
  1437.     RecordIDPtr            aRecord;        /*  --> */
  1438.     AttributePtr        attr;            /*  --> AttributeCreationID returned here */
  1439. };
  1440.  
  1441. typedef struct DirAddAttributeValuePB DirAddAttributeValuePB;
  1442.  
  1443. /*
  1444. aRecord must contain valid PackedRLI and a CreationID.
  1445.  
  1446. Instead of passing type, length, and value in three separate
  1447. fields, we take a pointer to an Attribute structure that contains
  1448. all three, and has room for the AttributeCreationNumber.
  1449. The AttributeCreationID will be returned in the attr itself.
  1450.  
  1451. The AttributeTag tells the catalog service that the attribute is an RString,
  1452. binary, or a RecordID.
  1453. */
  1454.  
  1455. /*
  1456. DeleteAttributeType:
  1457. This call is provided so that an existing AttributeType can be deleted.
  1458. If any attribute values exist for this type, they will all be deleted
  1459. (if the user has access rights to delete the values) and then the attribute type
  1460. will be deleted. Otherwise dsAccessDenied error will be returned.
  1461. */
  1462.  
  1463. struct DirDeleteAttributeTypePB {
  1464.     AuthDirParamHeader
  1465.     RecordIDPtr            aRecord;        /*  --> */
  1466.     AttributeTypePtr    attrType;        /*  --> */
  1467. };
  1468.  
  1469. typedef struct DirDeleteAttributeTypePB DirDeleteAttributeTypePB;
  1470.  
  1471. /*
  1472.     DeleteAttributeValue
  1473. */
  1474. struct DirDeleteAttributeValuePB {
  1475.     AuthDirParamHeader
  1476.     RecordIDPtr                aRecord;                /*  -> */
  1477.     AttributePtr            attr;                    /*  -> */
  1478. };
  1479. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  1480.  
  1481.  
  1482.  
  1483.  
  1484. /*
  1485.     ChangeAttributeValue:
  1486.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  1487.                     sufficient
  1488.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  1489.                     CreationID field will be set when
  1490.                     the call succeesfully completes
  1491.     
  1492.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  1493.  
  1494.  
  1495.     
  1496. */
  1497. struct DirChangeAttributeValuePB {
  1498.     AuthDirParamHeader
  1499.     RecordIDPtr                aRecord;            /*  -> */
  1500.     AttributePtr            currentAttr;        /*  -> */
  1501.     AttributePtr            newAttr;            /*  -> */
  1502. };
  1503. #ifndef __cplusplus
  1504. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  1505. #endif
  1506.  
  1507.  
  1508. /* VerifyAttributeValue */
  1509.  
  1510. struct DirVerifyAttributeValuePB {
  1511.     AuthDirParamHeader
  1512.     RecordIDPtr            aRecord;        /*  --> */
  1513.     AttributePtr        attr;            /*  --> */
  1514. };
  1515.  
  1516. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  1517.  
  1518. /*
  1519. aRecord must contain valid PackedRLI and a CreationID.
  1520.  
  1521. The attribute type and value are passed in the attribute structure.  If the
  1522. attribute CreationID is non-zero, the server will verify that an attribute with
  1523. the specified value and creation number exists in aRecord.  If the attribute
  1524. CreationID is zero, the server will verify the attribute by type and value
  1525. alone, and return the attribute CreationID in the Attribute struct if the
  1526. attribute exists.
  1527. */
  1528.  
  1529.  
  1530. /*
  1531. EnumerateAttributeTypesGet:
  1532. The following two calls can be used to enumerate the attribute types present in
  1533. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  1534. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  1535. be returned if the buffer was not large enough.  After this call completes, the
  1536. client can call EnumerateAttributeTypesParse (see below).
  1537.  
  1538. The user will able to continue from a startingPoint by setting a startingAttrType.
  1539. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  1540. when 'kOCEMoreData' is returned.
  1541.  
  1542. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  1543. will be included in the results, if it exists. If this is set to false, this value will not
  1544. be included. AttributeTypes following this type will be returned.
  1545. */
  1546.  
  1547. struct DirEnumerateAttributeTypesGetPB {
  1548.     AuthDirParamHeader
  1549.     RecordIDPtr            aRecord;                /*  --> */
  1550.     AttributeTypePtr    startingAttrType;        /*  --> starting point */
  1551.     long                cReserved;                /*  --  */
  1552.     long                dReserved;                /*  --  */
  1553.     long                eReserved;                /*  --  */
  1554.     long                fReserved;                /*  --  */
  1555.     long                gReserved;                /*  --  */
  1556.     long                hReserved;                /*  --  */
  1557.     Boolean                includeStartingPoint;    /*  --> if true return the attrType specified by starting point */
  1558.     Byte                padByte;
  1559.     short                i1Reserved;                /*  --  */
  1560.     Ptr                    getBuffer;                /*  --> */
  1561.     unsigned long        getBufferSize;            /*  --> */
  1562. };
  1563.  
  1564. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  1565.  
  1566. /* The call-back function is defined as follows: */
  1567. typedef pascal Boolean (*ForEachAttrType) (long clientData, const AttributeType *attrType);
  1568.  
  1569.  
  1570. /*
  1571. EnumerateAttributeTypesParse:
  1572. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  1573. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  1574. toolbox will parse through the buffer and call the call-back routine for
  1575. each attribute type in the getBuffer.
  1576.  
  1577. The client should return false from eachAttrType to continue
  1578. processing of the EnumerateAttributeTypesParse request.  Returning true will
  1579. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  1580. you pass in the parameter block will be passed to eachAttrType.
  1581. You are free to put anything in clientData - it is intended to allow
  1582. you some way to match the call-back to the original call (in case, for
  1583. example, you make simultaneous asynchronous calls).
  1584.  
  1585. For synchronous calls, the call-back routine actually runs as part of the same thread
  1586. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  1587. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1588. that were in effect when the call was made.  Because of this, the call-back
  1589. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  1590. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  1591. back routine can allocate memory. For asynchronous calls, call-back routine is
  1592. like a ioCompletion except that A5 will be preserved for the application.
  1593. */
  1594.  
  1595. struct DirEnumerateAttributeTypesParsePB {
  1596.     AuthDirParamHeader
  1597.     RecordIDPtr            aRecord;        /*  --> Same as DirEnumerateAttributeTypesGetPB */
  1598.     long                bReserved;        /*  --  */
  1599.     long                cReserved;        /*  --  */
  1600.     long                dReserved;        /*  --  */
  1601.     ForEachAttrType        eachAttrType;    /*  --> */
  1602.     long                fReserved;        /*  --  */
  1603.     long                gReserved;        /*  --  */
  1604.     long                hReserved;        /*  --  */
  1605.     long                iReserved;        /*  --  */
  1606.     Ptr                    getBuffer;        /*  --> */
  1607.     unsigned long        getBufferSize;    /*  --> */
  1608. };
  1609.  
  1610. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  1611.  
  1612. /*
  1613. DirAbort:
  1614. With this call a user will able to abort an outstanding catalog service call.
  1615. A user must pass a pointer to the parameter block for the outstanding call.
  1616. In the current version of the product, the toolbox will process this call
  1617. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  1618. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  1619. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  1620. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  1621. be called only in synchronous mode. Since the abort call makes references to fields in
  1622. the pb associated with the original call, this pb must not be disposed or or altered if
  1623. the original call completes before the abort call has completed.
  1624. */
  1625.  
  1626. struct DirAbortPB {
  1627.     AuthDirParamHeader
  1628.     union DirParamBlock *pb;            /*  --> pb for the call which must be aborted */
  1629. };
  1630.  
  1631. typedef struct DirAbortPB DirAbortPB;
  1632.  
  1633.  
  1634. /*
  1635. AddPseudonym:
  1636. An alternate name and type can be added to a given record. If allowDuplicate
  1637. is set the name and type will be added even if the same name and type already
  1638. exists.
  1639. */
  1640.  
  1641. struct DirAddPseudonymPB {
  1642.     AuthDirParamHeader
  1643.     RecordIDPtr            aRecord;        /*  --> RecordID to which pseudonym is to be added */
  1644.     RStringPtr            pseudonymName;    /*  --> new name to be added as pseudonym */
  1645.     RStringPtr            pseudonymType;    /*  --> new name to be added as pseudonym */
  1646.     Boolean                allowDuplicate;    /*  --> */
  1647. };
  1648.  
  1649. typedef struct DirAddPseudonymPB DirAddPseudonymPB;
  1650.  
  1651. /*
  1652. DeletePseudonym:
  1653. An alternate name and type for a given record can be deleted.
  1654. */
  1655.  
  1656. struct DirDeletePseudonymPB {
  1657.     AuthDirParamHeader
  1658.     RecordIDPtr            aRecord;        /*  --> RecordID to which pseudonym to be added */
  1659.     RStringPtr            pseudonymName;    /*  --> pseudonymName to be deleted */
  1660.     RStringPtr            pseudonymType;    /*  --> pseudonymType to be deleted */
  1661. };
  1662.  
  1663. typedef struct DirDeletePseudonymPB DirDeletePseudonymPB;
  1664.  
  1665.  
  1666. /*
  1667.     AddAlias:
  1668.     This call can be used to create an alias  record. The alias
  1669.     can be created either in the same or different cluster. ADAS will not support
  1670.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  1671.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  1672.     this call will create a record with the name and type specified an aRecord.
  1673.     This call works exactly like AddRecord.
  1674.     If 'allowDuplicate' is false and another record with same name and type already exists
  1675.     'daNoDupAllowed' error will be returned.
  1676. */
  1677. struct DirAddAliasPB {
  1678.     AuthDirParamHeader
  1679.     RecordIDPtr                aRecord;            /*  -> */
  1680.     Boolean                    allowDuplicate;        /*  -> */
  1681. };
  1682. typedef struct DirAddAliasPB DirAddAliasPB;
  1683.  
  1684.  
  1685. /*
  1686. DirFindValue:
  1687. This call can be used to find the occurrence of a value. The value
  1688. to be matched is passed in the buffer 'matchingData' field. The current
  1689. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  1690. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  1691. be used for comparing the occurrence of data. Search can be restricted to
  1692. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  1693. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  1694. can be specified to find the next occurrence of the same value.
  1695. 'sortDirection' can be specified with starting values to search forward or backward.
  1696. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  1697. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  1698. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  1699. attributes. Catalogs which don't support creationIDs may return the
  1700. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  1701. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  1702. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  1703. find the next occurrence of the value.
  1704. */
  1705.  
  1706. struct DirFindValuePB {
  1707.     AuthDirParamHeader
  1708.     PackedRLIPtr        aRLI;                /*  --> an RLI specifying the cluster to be enumerated */
  1709.     LocalRecordIDPtr    aRecord;            /*  --> if not nil, look only in this record */
  1710.     AttributeTypePtr    attrType;            /*  --> if not nil, look only in this attribute type */
  1711.     LocalRecordIDPtr    startingRecord;        /*  --> record in which to start searching */
  1712.     AttributePtr        startingAttribute;    /*  --> attribute in which to start searching */
  1713.     LocalRecordIDPtr    recordFound;        /* <--  record in which data was found */
  1714.     Attribute            attributeFound;        /* <--  attribute in which data was found */
  1715.     unsigned long        matchSize;            /*  --> length of matching bytes */
  1716.     Ptr                    matchingData;        /*  --> data bytes to be matched in search */
  1717.     DirSortDirection    sortDirection;        /*  --> sort direction (forwards or backwards) */
  1718. };
  1719.  
  1720. typedef struct DirFindValuePB DirFindValuePB;
  1721.  
  1722.  
  1723.  
  1724. /*
  1725. EnumeratePseudonymGet:
  1726. This call can be used to enumerate the existing pseudonyms for
  1727. a given record specified in 'aRecord'. A starting point can be specified
  1728. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  1729. is true and a starting point is specified, the name specified by startingName
  1730. and startingType also is returned in the results, if it exists. If this is set to false,
  1731. the pseudonym in startingName and Type is not included.
  1732. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  1733. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  1734. name and type of the pseudonym. If the buffer could not hold all the results, then
  1735. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  1736. using the last result returned as starting point for the next call.
  1737. */
  1738.  
  1739. struct DirEnumeratePseudonymGetPB {
  1740.     AuthDirParamHeader
  1741.     RecordIDPtr            aRecord;                /*  --> */
  1742.     RStringPtr            startingName;            /*  --> */
  1743.     RStringPtr            startingType;            /*  --> */
  1744.     long                dReserved;                /*  --  */
  1745.     long                eReserved;                /*  --  */
  1746.     long                fReserved;                /*  --  */
  1747.     long                gReserved;                /*  --  */
  1748.     long                hReserved;                /*  --  */
  1749.     Boolean                includeStartingPoint;    /*  --> if true return the Pseudonym specified by starting point will be included */
  1750.     Byte                padByte;
  1751.     short                i1Reserved;                /*  --  */
  1752.     Ptr                    getBuffer;                /*  --> */
  1753.     unsigned long        getBufferSize;            /*  --> */
  1754. };
  1755.  
  1756. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  1757.  
  1758. /* The call-back function is defined as follows: */
  1759. typedef pascal Boolean (*ForEachRecordID) (long clientData, const RecordID* recordID);
  1760.  
  1761. /*
  1762. EnumeratePseudonymParse:
  1763. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  1764. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  1765. will be called for each pseudonym.
  1766.  
  1767. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  1768.  
  1769. For synchronous calls, the call-back routine actually runs as part of the same thread
  1770. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  1771. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1772. that were in effect when the call was made.  Because of this, the call-back
  1773. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  1774. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  1775. back routine can allocate memory. For asynchronous calls, call-back routine is
  1776. like a ioCompletion except that A5 will be preserved for the application.
  1777. */
  1778.  
  1779. struct DirEnumeratePseudonymParsePB {
  1780.     AuthDirParamHeader
  1781.     RecordIDPtr            aRecord;        /*  --> same as DirEnumerateAliasesGetPB */
  1782.     long                bReserved;        /*  --  */
  1783.     long                cReserved;        /*  --  */
  1784.     ForEachRecordID        eachRecordID;    /*  --> */
  1785.     long                eReserved;        /*  --  */
  1786.     long                fReserved;        /*  --  */
  1787.     long                gReserved;        /*  --  */
  1788.     long                hReserved;        /*  --  */
  1789.     long                iReserved;        /*  --  */
  1790.     Ptr                    getBuffer;        /*  --> */
  1791.     unsigned long        getBufferSize;    /*  --> */
  1792. };
  1793.  
  1794. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  1795.  
  1796.  
  1797.  
  1798. /* GetNameAndType */
  1799.  
  1800. struct DirGetNameAndTypePB {
  1801.     AuthDirParamHeader
  1802.     RecordIDPtr            aRecord;        /*  --> */
  1803. };
  1804.  
  1805. typedef struct DirGetNameAndTypePB DirGetNameAndTypePB;
  1806.  
  1807. /*
  1808. aRecord must contain valid RLI and a CreationID.  It
  1809. must also contain pointers to maximum-length RStrings (name and type fields)
  1810. in which will be returned the record's distinguished name and type.
  1811. */
  1812.  
  1813.  
  1814. /*
  1815. SetNameAndType:
  1816. This call can be used to change a name and type for a record. The record
  1817. to be renamed is specified using 'aRecord'.
  1818. 'newName' and 'newType' indicate the name and type to be set.
  1819. 'allowDuplicate' if true indicates that name is to be set even if another
  1820. name and type exactly matches the newName and newType specified.
  1821.  
  1822. 'newName' and 'newType' are required since the catalogs not supporting
  1823. CreationID require name and type fields in the recordID to identify a given
  1824. record.
  1825. */
  1826.  
  1827. struct DirSetNameAndTypePB {
  1828.     AuthDirParamHeader
  1829.     RecordIDPtr            aRecord;        /*  --> */
  1830.     Boolean                allowDuplicate;    /*  --> */
  1831.     Byte                padByte;
  1832.     RStringPtr            newName;        /*  --> new name for the record */
  1833.     RStringPtr            newType;        /*  --> new type for the record */
  1834. };
  1835.  
  1836. typedef struct DirSetNameAndTypePB DirSetNameAndTypePB;
  1837.  
  1838.  
  1839.  
  1840.  
  1841. /*
  1842. DirGetMetaRecordInfo: This call can be made to obtain
  1843. the MetaRecordInfo for a given record. Information returned
  1844. is 16 bytes of OPAQUE information about the record.
  1845. */
  1846.  
  1847. struct DirGetRecordMetaInfoPB {
  1848.     AuthDirParamHeader
  1849.     RecordIDPtr            aRecord;        /*  --> */
  1850.     DirMetaInfo            metaInfo;        /* <--  */
  1851. };
  1852.  
  1853. typedef struct DirGetRecordMetaInfoPB DirGetRecordMetaInfoPB;
  1854.  
  1855.  
  1856. /*
  1857. DirGetDNodeMetaInfo: This call can be made to obtain
  1858. the DNodeMetaInfo for a given Packed RLI. Information returned
  1859. is 16 bytes of OPAQUE information about the DNode.
  1860. */
  1861.  
  1862. struct DirGetDNodeMetaInfoPB {
  1863.     AuthDirParamHeader
  1864.     PackedRLIPtr         pRLI;            /*  --> */
  1865.     DirMetaInfo            metaInfo;        /* <--  */
  1866. };
  1867.  
  1868. typedef struct DirGetDNodeMetaInfoPB DirGetDNodeMetaInfoPB;
  1869.  
  1870.  
  1871. /*
  1872. EnumerateDirectoriesGet:
  1873. A user can enumerate all the catalogs installed. This includes installed
  1874. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  1875. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  1876. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  1877. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  1878. The information for each catalog returned will have directoryName, discriminator and features.
  1879.  
  1880. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  1881. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  1882.  
  1883. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  1884. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  1885.  
  1886. If 'includeStartingPoint' is true and a starting point is specified,
  1887. the staring point will be returned in the result. If false, it is not included.
  1888. */
  1889.  
  1890. struct DirEnumerateDirectoriesGetPB {
  1891.     AuthDirParamHeader
  1892.     OCEDirectoryKind    directoryKind;                /*  --> enumerate catalogs bearing this signature */
  1893.     DirectoryNamePtr    startingDirectoryName;        /*  --> staring catalog name */
  1894.     DirDiscriminator    startingDirDiscriminator;    /*  --> staring catalog discriminator */
  1895.     long                eReserved;                    /*  --  */
  1896.     long                fReserved;                    /*  --  */
  1897.     long                gReserved;                    /*  --  */
  1898.     long                hReserved;                    /*  --  */
  1899.     Boolean                includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  1900.     Byte                padByte;
  1901.     short                i1Reserved;                    /*  --  */
  1902.     Ptr                    getBuffer;                    /*  --> */
  1903.     unsigned long        getBufferSize;                /*  --> */
  1904. };
  1905.  
  1906. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  1907.  
  1908.  
  1909.  
  1910.  
  1911. typedef pascal Boolean (*ForEachDirectory) (
  1912.     long clientData, const DirectoryName *dirName,
  1913.     const DirDiscriminator *discriminator, DirGestalt features);
  1914.  
  1915. /*
  1916. EnumerateDirectoriesParse:
  1917. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  1918. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  1919. be called for each catalog.
  1920.  
  1921. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  1922.  
  1923. For synchronous calls, the call-back routine actually runs as part of the same thread
  1924. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  1925. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1926. that were in effect when the call was made.  Because of this, the call-back
  1927. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  1928. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  1929. back routine can allocate memory. For asynchronous calls, call-back routine is
  1930. like a ioCompletion except that A5 will be preserved for the application.
  1931.  
  1932. eachDirectory will be called each time to return to the client a
  1933. DirectoryName, DirDiscriminator, and features for that catalog.
  1934. */
  1935.  
  1936. struct DirEnumerateDirectoriesParsePB {
  1937.     AuthDirParamHeader
  1938.     long                aReserved;        /*  --  */
  1939.     long                bReserved;        /*  --  */
  1940.     long                cReserved;        /*  --  */
  1941.     long                dReserved;        /*  --  */
  1942.     ForEachDirectory    eachDirectory;    /*  --> */
  1943.     long                fReserved;        /*  --  */
  1944.     long                gReserved;        /*  --  */
  1945.     long                hReserved;        /*  --  */
  1946.     long                iReserved;        /*  --  */
  1947.     Ptr                    getBuffer;        /*  --> */
  1948.     unsigned long        getBufferSize;    /*  --> */
  1949. };
  1950.  
  1951. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  1952.  
  1953.  
  1954. /*
  1955. The Following five call are specific to ADAP Catalogs. Toolbox
  1956. remembers a list of catalogs across boots. If any catalog service
  1957. call is intended for a ADAP catalog, then it must be in the list.
  1958. In order for managing this list, A client (Probably DE will use these
  1959. calls.
  1960. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  1961. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  1962. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  1963. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  1964. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  1965. */
  1966.  
  1967. /*
  1968. NetSearchADAPDirectoriesGet:
  1969. This call can be used to make a network wide search for finding ADAP catalogs.
  1970. This call will be supported only by 'ADAP' and involve highly expensive
  1971. network operations, so the user is advised to use utmost discretion before
  1972. making this call. The results will be collected in the 'getbuffer' and can be
  1973. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  1974. the directoryDiscriminator, features and serverHint (AppleTalk address for
  1975. a PathFinder serving that catalog) are collected for each catalog found
  1976. on the network. If buffer is too small to hold all the catalogs found on
  1977. the network, a 'kOCEMoreData' error will be returned.
  1978. */
  1979.  
  1980. struct DirNetSearchADAPDirectoriesGetPB {
  1981.     AuthDirParamHeader
  1982.     Ptr                    getBuffer;        /*  --> */
  1983.     unsigned long        getBufferSize;    /*  --> */
  1984.     long                cReserved;        /*  --  */
  1985. };
  1986.  
  1987. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  1988.  
  1989. typedef pascal Boolean (*ForEachADAPDirectory) (
  1990.     long clientData, const DirectoryName    *dirName,
  1991.     const DirDiscriminator *discriminator, DirGestalt features,
  1992.     AddrBlock serverHint);
  1993.  
  1994. /*
  1995. DirNetSearchADAPDirectoriesParse:
  1996. This call can be used to extract the results obtained in the 'getBuffer'.
  1997. The directoryName, directoryDiscriminator, features and
  1998. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  1999. returned in each call-back. These values may be used to make an
  2000. AddADAPDirectory call.
  2001.  
  2002. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2003.  
  2004. For synchronous calls, the call-back routine actually runs as part of the same thread
  2005. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2006. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2007. that were in effect when the call was made.  Because of this, the call-back
  2008. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2009. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2010. back routine can allocate memory. For asynchronous calls, call-back routine is
  2011. like a ioCompletion except that A5 will be preserved for the application.
  2012. */
  2013.  
  2014. struct DirNetSearchADAPDirectoriesParsePB {
  2015.     AuthDirParamHeader
  2016.     Ptr                        getBuffer;                /*  --> */
  2017.     unsigned long            getBufferSize;            /*  --> */
  2018.     ForEachADAPDirectory    eachADAPDirectory;        /*  --> */
  2019. };
  2020.  
  2021. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2022.  
  2023. /*
  2024. DirFindADAPDirectoryByNetSearch:
  2025. This call can be used to make a network wide search to find an ADAP catalog.
  2026. This call will be supported only by 'ADAP' and involves highly expensive
  2027. network operations, so the user is advised to use utmost discretion before
  2028. making this call. The catalog is specified using directoryName and discriminator.
  2029. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2030. list and will be visible through the EnumerateDirectories call and also
  2031. also a creationID to the directoryRecord will be returned.
  2032. If this parameter is set to 'false', the catalog will be added to temporary list
  2033. and will be available for making other catalog service calls. The catalogs
  2034. which are not in the preference catalog list will not be visible through the
  2035. EnumerateDirectories call.
  2036. */
  2037.  
  2038. struct DirFindADAPDirectoryByNetSearchPB {
  2039.     AuthDirParamHeader
  2040.     DirectoryNamePtr    directoryName;        /*  --> catalog name */
  2041.     DirDiscriminator    discriminator;        /*  --> discriminate between dup catalog names */
  2042.     Boolean                addToOCESetup;        /*  --> add this catalog to OCE Setup List */
  2043.     Byte                padByte;
  2044.     CreationID            directoryRecordCID;    /* <--  creationID for the catalog record */
  2045. };
  2046.  
  2047. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2048.  
  2049.  
  2050. /*
  2051. DirAddADAPDirectory:
  2052. The catalog specified by 'directoryName' and 'discriminator' will be
  2053. added to the list of catalogs maintained by the Toolbox. Once added,
  2054. the catalog is available across boots, until the catalog is removed
  2055. explicitly through a DirRemoveADAPDirectory call.
  2056. If 'serverHint' is not nil, the address provided will be used
  2057. to contact a PathFinder for the catalog specified.
  2058. If 'serverHint' is nil or does not point to a valid PathFinder server
  2059. for that catalog, this call will fail.
  2060. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2061. catalog list and will be visible through EnumerateDirectories calls and
  2062. also a creationID to the directoryRecord will be returned.
  2063. If this parameter is set to 'false', catalog will be added to temprary list
  2064. and will be available for making other catalog service calls. The catalogs
  2065. which are not in the setup  list will not be visible through
  2066. EnumerateDirectories call.
  2067. */
  2068.  
  2069. struct DirAddADAPDirectoryPB {
  2070.     AuthDirParamHeader
  2071.     DirectoryNamePtr    directoryName;        /*  --> catalog name */
  2072.     DirDiscriminator    discriminator;        /*  --> discriminate between dup catalog names */
  2073.     Boolean                addToOCESetup;        /*  --> add this catalog to OCE Setup */
  2074.     Byte                padByte;
  2075.     CreationID            directoryRecordCID;    /* <--  creationID for the catalog record */
  2076. };
  2077.  
  2078. typedef struct DirAddADAPDirectoryPB DirAddADAPDirectoryPB;
  2079.  
  2080.  
  2081.  
  2082. /*
  2083. GetDirectoryInfo:
  2084. DirGetDirectoryInfo will do:
  2085.  
  2086. If a 'dsRefNum' is non-Zero, the catalog information for
  2087.     the corresponding  PAB will be  returned.
  2088.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2089.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2090.  the catalog information (i.e. directoryName, discriminator, features)
  2091.  for that catalog will be returned.
  2092.     If a  valid catalog name and discriminator are provided
  2093.     features (Set of capability flags) for that catalog will be returned.
  2094. */
  2095.  
  2096. struct DirGetDirectoryInfoPB {
  2097.     AuthDirParamHeader
  2098.     DirectoryNamePtr    directoryName;    /*  --> catalog name */
  2099.     DirDiscriminator    discriminator;    /* <--> descriminate between dup catalog names */
  2100.     DirGestalt            features;        /* <--  capability bit flags */
  2101. };
  2102.  
  2103. typedef struct DirGetDirectoryInfoPB DirGetDirectoryInfoPB;
  2104.  
  2105. #ifdef    __cplusplus
  2106. extern "C" {
  2107. #endif
  2108.  
  2109. /*
  2110. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  2111. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  2112. DSSpec that can be used in the Get or Set Access Controls calls.
  2113. */
  2114.  
  2115. pascal DSSpec *OCEGetAccessControlDSSpec (const CategoryMask categoryBitMask) __OCEUtils(kOCEGetAccessControlDSSpec);
  2116.  
  2117. #ifdef    __cplusplus
  2118. }
  2119. #endif
  2120.  
  2121. /*
  2122.  * Note on Access Controls:
  2123.  * Access control is based on a list model.
  2124.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2125.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2126.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2127.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2128.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2129.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2130.  *
  2131.  */
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138. /*
  2139.     GetDNodeAccessControlGet:
  2140.     This call can be done to get back access control list for a DNode.
  2141.     pRLI -> RLI of the DNode whose access control list is sought
  2142.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2143.                       the identity parameter will be returned other wise entire list
  2144.                       will be returned.
  2145.     startingDsObj  -> If this is not nil, list should be started after this object.
  2146.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2147.                               results.
  2148.                               
  2149.     The results will be collected in the 'getBuffer' supplied by the user.
  2150.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2151.      
  2152.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2153.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2154.     
  2155.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2156.  
  2157. */
  2158.  
  2159.  
  2160. struct DirGetDNodeAccessControlGetPB {
  2161.     AuthDirParamHeader
  2162.     PackedRLIPtr pRLI;            /*  -> RLI of the cluster whose access control list is sought  */
  2163.     long                        bReserved;      /*  -- unused */
  2164.     long                        cReserved;      /*  -- unused */
  2165.     long                        dReserved;      /*  -- unused */
  2166.     long                         eResreved;         /* --> */
  2167.     Boolean                        forCurrentUserOnly;     /* -->  */
  2168.     DSSpec                        *startingPoint; /* --> starting Point */
  2169.     Boolean                        includeStartingPoint; /*  -> if true return the DsObject 
  2170.                                                                 specified in starting point */ 
  2171.     Ptr                            getBuffer;        /*    -> */
  2172.     unsigned long                getBufferSize;    /*  -> */
  2173.  
  2174.  
  2175. };
  2176. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  2177.  
  2178.  /* The Access Control call-back function is defined as follows: */
  2179. typedef pascal Boolean (*ForEachDNodeAccessControl) (long clientData, 
  2180.                                 const DSSpec *dsObj, AccessMask activeDnodeAccMask,
  2181.                                 AccessMask defaultRecordAccMask,
  2182.                                 AccessMask defaultAttributeAccMask);
  2183.  
  2184. /*
  2185.     GetDNodeAccessControlParse:
  2186.     After an GetDNodeAccessControlGet call has completed, 
  2187.     call GetDNodeAccessControlParse to parse through the buffer that
  2188.     that was filled in GetDNodeAccessControlGet.
  2189.     
  2190.     'eachObject' will be called each time to return to the client a
  2191.     DsObject and a set of three accMasks (three long words) for that object.
  2192.     Acceesmasks returned apply to the dsObject in the callback :
  2193.     1. Currently Active Access mask for the specified DNode.
  2194.     2. Default Access mask for any Record in the DNode
  2195.     3. Default Access mask for any Attribute in the DNode
  2196.     The clientData parameter that you pass in the parameter block will be passed
  2197.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2198.     to allow you some way to match the call-back to the original call (for
  2199.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2200.     associate returned results in some way).
  2201.     
  2202.     The client should return FALSE from 'eachObject' to continue
  2203.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  2204.     terminate the GetDNodeAccessControlParse request.
  2205.  
  2206.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2207.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  2208.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2209.     that were in effect when the call was made.  Because of this, the call-back
  2210.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  2211.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  2212.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2213.     like a ioCompletion except that A5 will be preserved for the application.
  2214.  
  2215.  
  2216. */
  2217.  
  2218.  
  2219. struct DirGetDNodeAccessControlParsePB {
  2220.     AuthDirParamHeader
  2221.     PackedRLIPtr pRLI;                    /*  -> RLI of the cluster  */
  2222.     long                        bReserved;              /*  -- unused */
  2223.     long                        cReserved;              /*  -- unused */
  2224.     long                        dReserved;              /*  -- unused */
  2225.     ForEachDNodeAccessControl    eachObject;     /* --> */
  2226.     Boolean                        forCurrentUserOnly;         /* -->  */
  2227.     DSSpec                        *startingPoint;         /* --> starting Point */
  2228.     Boolean                        includeStartingPoint; /*  -> if true return the record 
  2229.                                                         specified in starting point */ 
  2230.     Ptr                            getBuffer;                /*    -> */
  2231.     unsigned long                getBufferSize;            /*  -> */
  2232.  
  2233.  
  2234. };
  2235. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  2236.  
  2237.  
  2238. /*
  2239.     GetRecordAccessControlGet:
  2240.     This call can be done to get back access control list for a RecordID.
  2241.     aRecord -> RecordID to which access control list is sought
  2242.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2243.                       the identity parameter will be returned other wise entire list
  2244.                       will be returned.
  2245.     startingDsObj  -> If this is not nil, list should be started after this object.
  2246.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2247.                               results.
  2248.                               
  2249.     The results will be collected in the 'getBuffer' supplied by the user.
  2250.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2251.      
  2252.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2253.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2254.     
  2255.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  2256.  
  2257. */
  2258.  
  2259.  
  2260. struct DirGetRecordAccessControlGetPB {
  2261.     AuthDirParamHeader
  2262.     RecordIDPtr                 aRecord;        /*  -> RecordID to which access control list is sought list is sought  */
  2263.     long                        bReserved;      /*  -- unused */
  2264.     long                        cReserved;      /*  -- unused */
  2265.     long                        dReserved;      /*  -- unused */
  2266.     long                         eResreved;         /* --> */
  2267.     Boolean                        forCurrentUserOnly;     /* -->  */
  2268.     DSSpec                        *startingPoint; /* --> starting Point */
  2269.     Boolean                        includeStartingPoint; /*  -> if true return the DsObject 
  2270.                                                                 specified in starting point */ 
  2271.     Ptr                            getBuffer;        /*    -> */
  2272.     unsigned long                getBufferSize;    /*  -> */
  2273.  
  2274.  
  2275. };
  2276. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  2277.  
  2278.  /* The Access Control call-back function is defined as follows: */
  2279. typedef pascal Boolean (*ForEachRecordAccessControl) (long clientData, 
  2280.                                 const    DSSpec *dsObj, AccessMask activeDnodeAccMask,
  2281.                                 AccessMask activeRecordAccMask,
  2282.                                 AccessMask defaultAttributeAccMask);
  2283.  
  2284. /*
  2285.     GetRecordAccessControlParse:
  2286.     After an GetRecordAccessControlGet call has completed, 
  2287.     call GetRecordAccessControlParse to parse through the buffer that
  2288.     that was filled in GetRecordAccessControlGet.
  2289.     
  2290.     'eachObject' will be called each time to return to the client a
  2291.     DsObject and a set of three accMasks (three long words) for that object.
  2292.     Acceesmasks returned apply to the dsObject in the callback :
  2293.     1. Active Access mask for the DNode Containing the Record.
  2294.     2. Active Access mask for the Record specified.
  2295.     3. Defualt Access mask for Attributes in the record.
  2296.     The clientData parameter that you pass in the parameter block will be passed
  2297.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2298.     to allow you some way to match the call-back to the original call (for
  2299.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  2300.     associate returned results in some way).
  2301.     
  2302.     The client should return FALSE from 'eachObject' to continue
  2303.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  2304.     terminate the GetRecordAccessControlParse request.
  2305.  
  2306.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2307.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  2308.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2309.     that were in effect when the call was made.  Because of this, the call-back
  2310.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  2311.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  2312.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2313.     like a ioCompletion except that A5 will be preserved for the application.
  2314.  
  2315.  
  2316. */
  2317.  
  2318.  
  2319. struct DirGetRecordAccessControlParsePB {
  2320.     AuthDirParamHeader
  2321.     RecordIDPtr                 aRecord;                /*  -> RecordID to which access control list is sought list is sought  */
  2322.     long                        bReserved;              /*  -- unused */
  2323.     long                        cReserved;              /*  -- unused */
  2324.     long                        dReserved;              /*  -- unused */
  2325.     ForEachRecordAccessControl    eachObject;  /* --> */
  2326.     Boolean                        forCurrentUserOnly;         /* -->  */
  2327.     DSSpec                        *startingPoint;         /* --> starting Point */
  2328.     Boolean                        includeStartingPoint; /*  -> if true return the record 
  2329.                                                         specified in starting point */ 
  2330.     Ptr                            getBuffer;                /*    -> */
  2331.     unsigned long                getBufferSize;            /*  -> */
  2332.  
  2333.  
  2334. };
  2335. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  2336.  
  2337.  
  2338. /*
  2339.     GetAttributeAccessControlGet:
  2340.     This call can be done to get back access control list for a attributeType with in a RecordID.
  2341.     aRecord -> RecordID to which access control list is sought
  2342.     aType    -> Attribute Type to which access controls are sought
  2343.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2344.                       the identity parameter will be returned other wise entire list
  2345.                       will be returned.
  2346.     startingDsObj  -> If this is not nil, list should be started after this object.
  2347.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2348.                               results.
  2349.                               
  2350.     The results will be collected in the 'getBuffer' supplied by the user.
  2351.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2352.      
  2353.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2354.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2355.     
  2356.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  2357.  
  2358. */
  2359.  
  2360.  
  2361. struct DirGetAttributeAccessControlGetPB {
  2362.     AuthDirParamHeader
  2363.     RecordIDPtr                    aRecord;        /*  -> RecordID to which access control list is sought list is sought  */
  2364.     AttributeTypePtr            aType;            /*  -> Attribute Type to which access controls are sought          */
  2365.     long                        cReserved;      /*  -- unused */
  2366.     long                        dReserved;      /*  -- unused */
  2367.     long                         eResreved;         /* --> */
  2368.     Boolean                        forCurrentUserOnly;     /* -->  */
  2369.     DSSpec                        *startingPoint; /* --> starting Point */
  2370.     Boolean                        includeStartingPoint; /*  -> if true return the DsObject 
  2371.                                                                 specified in starting point */ 
  2372.     Ptr                            getBuffer;        /*    -> */
  2373.     unsigned long                getBufferSize;    /*  -> */
  2374.  
  2375.  
  2376. };
  2377. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  2378.  
  2379.  /* The Access Control call-back function is defined as follows: */
  2380. typedef pascal Boolean (*ForEachAttributeAccessControl) (long clientData, 
  2381.                                 const    DSSpec *dsObj, AccessMask activeDnodeAccMask,
  2382.                                 AccessMask activeRecordAccMask,
  2383.                                 AccessMask activeAttributeAccMask);
  2384.  
  2385. /*
  2386.     GetAttributeAccessControlParse:
  2387.     After an GetAttributeAccessControlGet call has completed, 
  2388.     call GetAttributeAccessControlParse to parse through the buffer that
  2389.     that was filled in GetAttributeAccessControlGet.
  2390.     
  2391.     'eachObject' will be called each time to return to the client a
  2392.     DsObject and a set of three accMasks (three long words) for that object.
  2393.     Acceesmasks returned apply to the dsObject in the callback :
  2394.     1. Active Access mask for the DNode Containing the Attribute.
  2395.     2. Active Access mask for the Record in the Containing the Attribute.
  2396.     3. Active Access mask for the specified Attribute.
  2397.     The clientData parameter that you pass in the parameter block will be passed
  2398.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2399.     to allow you some way to match the call-back to the original call (for
  2400.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  2401.     associate returned results in some way).
  2402.     
  2403.     The client should return FALSE from 'eachObject' to continue
  2404.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  2405.     terminate the GetAttributeAccessControlParse request.
  2406.  
  2407.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2408.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  2409.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2410.     that were in effect when the call was made.  Because of this, the call-back
  2411.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  2412.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  2413.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2414.     like a ioCompletion except that A5 will be preserved for the application.
  2415.  
  2416.  
  2417. */
  2418.  
  2419.  
  2420. struct DirGetAttributeAccessControlParsePB {
  2421.     AuthDirParamHeader
  2422.     RecordIDPtr                        aRecord;        /*  -> RecordID to which access control list is sought list is sought  */
  2423.     AttributeTypePtr                aType;            /*  -> Attribute Type to which access controls are sought          */
  2424.     long                            cReserved;              /*  -- unused */
  2425.     long                            dReserved;              /*  -- unused */
  2426.     ForEachAttributeAccessControl    eachObject; /* --> */
  2427.     Boolean                            forCurrentUserOnly;         /* -->  */
  2428.     DSSpec                            *startingPoint;         /* --> starting Point */
  2429.     Boolean                            includeStartingPoint; /*  -> if true return the record 
  2430.                                                         specified in starting point */ 
  2431.     Ptr                                getBuffer;                /*    -> */
  2432.     unsigned long                    getBufferSize;            /*  -> */
  2433.  
  2434.  
  2435. };
  2436. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444. /*
  2445. MapPathNameToDNodeNumber:
  2446. This call maps a given PathName within a catalog to its DNodeNumber.
  2447. */
  2448.  
  2449. struct DirMapPathNameToDNodeNumberPB {
  2450.     AuthDirParamHeader
  2451.     DirectoryNamePtr    directoryName;    /*  --> catalog name */
  2452.     DirDiscriminator    discriminator;    /*  --> discriminator */
  2453.     DNodeNum             dNodeNumber;    /* <--  dNodenumber to the path */
  2454.     PackedPathNamePtr    path;            /*  --> Path Name to be mapped */
  2455. };
  2456.  
  2457. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  2458.  
  2459. /*
  2460. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  2461. returned in the DNodeNumber field. directoryName and descriminator Fields are
  2462. ignored. DSRefNum is used to identify the catalog.
  2463. */
  2464.  
  2465.  
  2466.  
  2467. /*
  2468. MapDNodeNumberToPathName:
  2469. This call will map a given DNodeNumber with in a catalog to the
  2470. corresponding PathName.
  2471. */
  2472.  
  2473. struct DirMapDNodeNumberToPathNamePB {
  2474.     AuthDirParamHeader
  2475.     DirectoryNamePtr    directoryName;        /*  --> catalog name */
  2476.     DirDiscriminator    discriminator;        /*  --> discriminator */
  2477.     DNodeNum            dNodeNumber;        /*  --> dNodenumber to be mapped */
  2478.     PackedPathNamePtr    path;                /* <--  Packed Path Name returned */
  2479.     unsigned short        lengthOfPathName;    /*  --> length of packed pathName structure*/
  2480. };
  2481.  
  2482. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  2483.  
  2484. /*
  2485. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  2486. pathName and returned in the PackedPathName field.
  2487. lengthOfPathName is to be set the length of pathName structure.
  2488. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  2489. OSErr will be returned.
  2490. */
  2491.  
  2492. /*
  2493. GetLocalNetworkSpec:
  2494. This call will return the Local NetworkSpec. Client should supply
  2495. an RString big enough to hold the NetworkSpec.
  2496. */
  2497.  
  2498. struct DirGetLocalNetworkSpecPB {
  2499.     AuthDirParamHeader
  2500.     DirectoryNamePtr    directoryName;    /*  --> catalog name */
  2501.     DirDiscriminator    discriminator;    /*  --> discriminator */
  2502.     NetworkSpecPtr        networkSpec;    /* <--  NetworkSpec */
  2503. };
  2504.  
  2505. typedef struct DirGetLocalNetworkSpecPB DirGetLocalNetworkSpecPB;
  2506.  
  2507. /*
  2508. PathName in the path field must be set to nil. internetName should be large
  2509. enough to hold the internetName. InterNetname returned indicates path finder's
  2510. local internet (configured by administrator).
  2511. */
  2512.  
  2513. /*
  2514. GetDNodeInfo:
  2515. This call will return the information (internetName and descriptor)
  2516. for the given RLI of a DNode.
  2517. */
  2518.  
  2519. struct DirGetDNodeInfoPB {
  2520.     AuthDirParamHeader
  2521.     PackedRLIPtr        pRLI;            /*  --> packed RLI whose info is requested */
  2522.     DirNodeKind            descriptor;        /* <--  dNode descriptor */
  2523.     NetworkSpecPtr        networkSpec;    /* <--  cluster's networkSpec if kIsCluster */
  2524. };
  2525.  
  2526. typedef struct DirGetDNodeInfoPB DirGetDNodeInfoPB;
  2527.  
  2528. /*
  2529. If DnodeNumber is set to a non zero value, path should be set to nil.
  2530. if DnodeNumber is set to zero, pathName should point to a packed path name.
  2531. internetName should be large enough to hold
  2532. the internetName. (If the internetName is same as the one got by
  2533. GetLocalInternetName call, it indicates cluster is reachable  without
  2534. forwarders, --> Tell me if I am wrong)
  2535. */
  2536.  
  2537.  
  2538. /*
  2539. DirCreatePersonalDirectory:
  2540. A new  personal catalog can be created by specifying an FSSpec for
  2541. the file. If a file already exists dupFNErr will be returned. This call is
  2542. supported 'synchronous' mode only.
  2543. */
  2544.  
  2545. struct DirCreatePersonalDirectoryPB {
  2546.     AuthDirParamHeader
  2547.     FSSpecPtr            fsSpec;            /*  --> FSSpec for the Personal Catalog */
  2548.     OSType                fdType;            /*  --> file type for the Personal Catalog */
  2549.     OSType                fdCreator;        /*  --> file creator for the Personal Catalog */
  2550. };
  2551.  
  2552. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  2553.  
  2554. /*
  2555. DirOpenPersonalDirectory:
  2556. An existing personal catalog can be opened using this call.
  2557. User can specify the personal catalog by FSSpec for the AddressBook file.
  2558. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  2559. are the only accepted open modes for the address book.
  2560. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  2561. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  2562. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  2563. associated with the personal catalog.
  2564. This call is supported 'synchronous' mode only.
  2565. */
  2566.  
  2567.  
  2568. struct DirOpenPersonalDirectoryPB {
  2569.     AuthDirParamHeader
  2570.     FSSpecPtr            fsSpec;                /*  --> Open an existing Personal Catalog */
  2571.     char                accessRequested;    /*  --> Open: permissions Requested(byte)*/
  2572.     char                accessGranted;        /*  <-- Open: permissions (byte) (Granted)*/
  2573.     DirGestalt            features;            /* <--  features for Personal Catalog */
  2574. };
  2575.  
  2576. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  2577.  
  2578. /*
  2579. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  2580. The Personal Catalog specified by the 'dsRefNum' will be closed.
  2581. This call is supported 'synchronous' mode only.
  2582. */
  2583.  
  2584. struct DirClosePersonalDirectoryPB {
  2585.     AuthDirParamHeader
  2586. };
  2587.  
  2588. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  2589.  
  2590.  
  2591. /*
  2592. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  2593. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  2594. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  2595. If a client has a need to make the AddressBook reference to persistent
  2596. acrross boots it should make use of this call. In the current implementaion
  2597. PackedRLI has an embeeded System7.0 'alias'. If in later time
  2598. If client has a need to make reference to the AddressBook, it must use
  2599. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  2600. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  2601.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  2602.                         absolute alias is created.
  2603.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  2604.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  2605.                         fails with 'kOCEMoreData' error a client can reissue
  2606.                     this call with a larger buffer of this length.
  2607.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  2608.   returned.
  2609. This call is supported in 'synchronous' mode only.
  2610. */
  2611.  
  2612. struct DirMakePersonalDirectoryRLIPB {
  2613.     AuthDirParamHeader
  2614.     FSSpecPtr            fromFSSpec;        /*  --> FSSpec for creating relative alia */
  2615.     unsigned short        pRLIBufferSize;    /*  --> Length of 'pRLI' buffer */
  2616.     unsigned short        pRLISize;        /* <--  Length of actual 'pRLI' */
  2617.     PackedRLIPtr        pRLI;            /* <--  pRLI for the specified AddressBook */
  2618. };
  2619.  
  2620.  
  2621. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  2622.  
  2623. /*****************************************************************************
  2624. The calls described below apply only for CSAM Drivers:
  2625.  
  2626. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  2627.     DirAddDSAM
  2628.     DirRemoveDSAM
  2629.     DirInstantiateDSAM
  2630.  
  2631. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  2632.     DirAddDSAMDirectory
  2633.     DirRemoveDirectory
  2634.  
  2635. DirGetDirectoryIcon call is used by clients to get any special icon associated
  2636. with a CSAM catalog.
  2637.  
  2638. *****************************************************************************/
  2639.  
  2640.  
  2641. /*
  2642. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  2643. after discovering the CSAM file.
  2644.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  2645.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  2646.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  2647. If the call is successfull 'DSAMRecordCID' will be returned. If the
  2648. call returns 'daDSAMRecordCIDExists', record was already there and
  2649. 'dsamRecordCID' will be returned.
  2650. This call can be done only in synchronous mode.
  2651. */
  2652.  
  2653. struct DirAddDSAMPB {
  2654.     AuthDirParamHeader
  2655.     CreationID            dsamRecordCID;    /* <--  CreationID for the CSAM record */
  2656.     RStringPtr            dsamName;        /*  --> CSAM name */
  2657.     OCEDirectoryKind    dsamKind;        /*  --> CSAM kind */
  2658.     FSSpecPtr            fsSpec;            /*  --> FSSpec for the file containing CSAM */
  2659. };
  2660.  
  2661. typedef struct DirAddDSAMPB DirAddDSAMPB;
  2662.  
  2663. /*
  2664. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  2665. Driver Open call to indicate the toolbox about the availability of the CSAM.
  2666.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  2667.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  2668.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  2669.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  2670.     CSAM should already be setup using DirAddDSAM call.
  2671.     DSAMDirProc -> This procedure will be called when  any catalog service
  2672.     call intended for the CSAM (other then parse calls)
  2673.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  2674.     are called.
  2675.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  2676.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  2677. This call can be done only in synchronous mode.
  2678. */
  2679.  
  2680. struct DirInstantiateDSAMPB {
  2681.     AuthDirParamHeader
  2682.     RStringPtr            dsamName;            /*  --> dsamName name */
  2683.     OCEDirectoryKind    dsamKind;            /*  --> DSAMKind */
  2684.     Ptr                    dsamData;            /*  --> dsamData  */
  2685.     ProcPtr                dsamDirProc;        /*  --> of type DSAMDirProc: for catalog service calls */
  2686.     ProcPtr                dsamDirParseProc;    /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  2687.     ProcPtr                dsamAuthProc;        /*  --> of type DSAMAuthProc: for authetication service calls */
  2688. };
  2689.  
  2690. typedef struct DirInstantiateDSAMPB DirInstantiateDSAMPB;
  2691.  
  2692.  
  2693. /*
  2694. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  2695.     dsamRecordCID -> is the creationID of the CSAM record.
  2696. This call can be made only in synchronous mode.
  2697. */
  2698.  
  2699. struct DirRemoveDSAMPB {
  2700.     AuthDirParamHeader
  2701.     CreationID            dsamRecordCID;    /* <--  CreationID for the CSAM record */
  2702. };
  2703.  
  2704. typedef struct DirRemoveDSAMPB DirRemoveDSAMPB;
  2705.  
  2706.  
  2707. /*
  2708. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  2709.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  2710.     directoryName ->  name of the catalog
  2711.     discriminator -> discriminator for the catalog
  2712.     directoryRecordCID -> If the call is successful, creationID for the record will
  2713.                             be returned.
  2714. */
  2715.  
  2716. struct DirAddDSAMDirectoryPB {
  2717.     AuthDirParamHeader
  2718.     CreationID            dsamRecordCID;            /*  --> CreationID for the CSAM record */
  2719.     DirectoryNamePtr    directoryName;            /*  --> catalog name */
  2720.     DirDiscriminator    discriminator;            /*  --> catalog discriminator */
  2721.     DirGestalt            features;                /*  --> capabilty flags for the catalog */
  2722.     CreationID            directoryRecordCID;        /* <--  creationID for the catalog record */
  2723. };
  2724.  
  2725. typedef struct DirAddDSAMDirectoryPB DirAddDSAMDirectoryPB;
  2726.  
  2727. /*
  2728. DirRemoveDirectory: This call can be used to inform the toolbox that
  2729. catalog specified by 'directoryRecordCID'
  2730. */
  2731.  
  2732. struct DirRemoveDirectoryPB {
  2733.     AuthDirParamHeader
  2734.     CreationID            directoryRecordCID;    /*  --> creationID for the catalog record */
  2735. };
  2736.  
  2737. typedef struct DirRemoveDirectoryPB DirRemoveDirectoryPB;
  2738.  
  2739. /*
  2740.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  2741.  * the information of various foreign catalogs supported.
  2742.  * Typically a DE Template  may make this call to create a
  2743.  * Address template or a Gateway may make this call to findout
  2744.  * catalog name space in which MSAM may would support. 
  2745.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  2746.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  2747.  * returned and reissue the call with increaing buffer.
  2748.  * Toolbox will findout the private information of each of the Foreign Catalogs
  2749.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  2750.  * for each catalog will be packed in the format: 
  2751.  * typedef struct EachDirectoryData {
  2752.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  2753.  *  OSType                            entnType;        //  Entn Type
  2754.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  2755.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  2756.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  2757.  *    long                            length;        //  data length
  2758.  *    char                            data[length];  //  data padded to even boundary
  2759.  * };
  2760.  *
  2761.  *
  2762.  *
  2763.  * typedef struct myData {
  2764.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  2765.  *    };
  2766.  *
  2767.  */
  2768.  
  2769. struct DirGetExtendedDirectoriesInfoPB {
  2770.     AuthDirParamHeader
  2771.     Ptr                    buffer;            /*  --> Pointer to a buufer where data will be returned */
  2772.     unsigned long        bufferSize;        /*  --> Length of the buffer, Length of actual data will be returned here */
  2773.     unsigned long        totalEntries;    /* <--  Total Number of Catalogs found */
  2774.     unsigned long        actualEntries;    /* <--  Total Number of Catalogs entries returned */
  2775. };
  2776.  
  2777. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  2778.  
  2779. /*
  2780. DirGetDirectoryIconPB: With this call a client can find out about
  2781. the icons supported by the Catalog.
  2782. Both ADAP and Personal Catalog will not support this call for now.
  2783. A CSAM can support a call so that DE Extension can use this
  2784. call to find appropriate Icons.
  2785.  
  2786. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  2787. */
  2788.  
  2789. struct DirGetDirectoryIconPB {
  2790.     AuthDirParamHeader
  2791.     PackedRLIPtr        pRLI;            /*  --> packed RLI for the catalog */
  2792.     OSType                iconType;        /*  --> Type of Icon requested */
  2793.     Ptr                    iconBuffer;        /*  --> Buffer to hold Icon Data */
  2794.     unsigned long        bufferSize;        /*  <-> size of buffer to hold icon data */
  2795. };
  2796.  
  2797. typedef struct DirGetDirectoryIconPB DirGetDirectoryIconPB;
  2798.  
  2799. /*
  2800. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  2801. and oceSetupRecordCID for the oceSetup Record.
  2802. Clients interested in manipulating OCE Setup Personal Catalog directly should
  2803. make this call to get 'dsRefNum'.
  2804. 'dsRefNum' will be returned in the standard field in the AuthDirParamHeader.
  2805. */
  2806.  
  2807. struct DirGetOCESetupRefNumPB {
  2808.     AuthDirParamHeader
  2809.     CreationID            oceSetupRecordCID;    /* --> creationID for the catalog record */
  2810. };
  2811.  
  2812. typedef struct DirGetOCESetupRefNumPB DirGetOCESetupRefNumPB;
  2813.  
  2814.  
  2815.  
  2816. /*****************************************************************************/
  2817. /* Catalog and Authentication control blocks and operation definitions */
  2818.  
  2819. union AuthParamBlock {
  2820.     struct {AuthDirParamHeader}            header;
  2821.     AuthBindSpecificIdentityPB            bindIdentityPB;
  2822.     AuthUnbindSpecificIdentityPB        unbindIdentityPB;
  2823.     AuthResolveCreationIDPB                resolveCreationIDPB;
  2824.     AuthGetSpecificIdentityInfoPB        getIdentityInfoPB;
  2825.     AuthAddKeyPB                        addKeyPB;
  2826.     AuthChangeKeyPB                        changeKeyPB;
  2827.     AuthDeleteKeyPB                        deleteKeyPB;
  2828.     AuthPasswordToKeyPB                    passwordToKeyPB;
  2829.     AuthGetCredentialsPB                getCredentialsPB;
  2830.     AuthDecryptCredentialsPB            decryptCredentialsPB;
  2831.     AuthMakeChallengePB                    makeChallengePB;
  2832.     AuthMakeReplyPB                        makeReplyPB;
  2833.     AuthVerifyReplyPB                    verifyReplyPB;
  2834.     AuthGetUTCTimePB                    getUTCTimePB;
  2835.     AuthMakeProxyPB                        makeProxyPB;
  2836.     AuthTradeProxyForCredentialsPB        tradeProxyForCredentialsPB;
  2837.     AuthGetLocalIdentityPB                getLocalIdentityPB;
  2838.     AuthUnlockLocalIdentityPB            unLockLocalIdentityPB;
  2839.     AuthLockLocalIdentityPB                lockLocalIdentityPB;
  2840.     AuthAddToLocalIdentityQueuePB        localIdentityQInstallPB;
  2841.     AuthRemoveFromLocalIdentityQueuePB    localIdentityQRemovePB;
  2842.     AuthSetupLocalIdentityPB            setupLocalIdentityPB;
  2843.     AuthChangeLocalIdentityPB            changeLocalIdentityPB;
  2844.     AuthRemoveLocalIdentityPB            removeLocalIdentityPB;
  2845.     OCESetupAddDirectoryInfoPB            setupDirectoryIdentityPB;
  2846.     OCESetupChangeDirectoryInfoPB        changeDirectoryIdentityPB;
  2847.     OCESetupRemoveDirectoryInfoPB        removeDirectoryIdentityPB;
  2848.     OCESetupGetDirectoryInfoPB            getDirectoryIdentityInfoPB;
  2849. };
  2850.  
  2851. typedef union AuthParamBlock AuthParamBlock;
  2852. typedef AuthParamBlock *AuthParamBlockPtr;
  2853.  
  2854.  
  2855. union DirParamBlock {
  2856.     struct {AuthDirParamHeader}            header;
  2857.     DirAddRecordPB                        addRecordPB;
  2858.     DirDeleteRecordPB                    deleteRecordPB;
  2859.     DirEnumerateGetPB                    enumerateGetPB;
  2860.     DirEnumerateParsePB                    enumerateParsePB;
  2861.     DirFindRecordGetPB                    findRecordGetPB;
  2862.     DirFindRecordParsePB                findRecordParsePB;
  2863.     DirLookupGetPB                        lookupGetPB;
  2864.     DirLookupParsePB                    lookupParsePB;
  2865.     DirAddAttributeValuePB                addAttributeValuePB;
  2866.     DirDeleteAttributeTypePB            deleteAttributeTypePB;
  2867.     DirDeleteAttributeValuePB            deleteAttributeValuePB;
  2868.     DirChangeAttributeValuePB            changeAttributeValuePB;
  2869.     DirVerifyAttributeValuePB            verifyAttributeValuePB;
  2870.     DirFindValuePB                        findValuePB;
  2871.     DirEnumeratePseudonymGetPB            enumeratePseudonymGetPB;
  2872.     DirEnumeratePseudonymParsePB        enumeratePseudonymParsePB;
  2873.     DirAddPseudonymPB                    addPseudonymPB;
  2874.     DirDeletePseudonymPB                deletePseudonymPB;
  2875.     DirAddAliasPB                        addAliasPB;
  2876.     DirEnumerateAttributeTypesGetPB        enumerateAttributeTypesGetPB;
  2877.     DirEnumerateAttributeTypesParsePB    enumerateAttributeTypesParsePB;
  2878.     DirGetNameAndTypePB                    getNameAndTypePB;
  2879.     DirSetNameAndTypePB                    setNameAndTypePB;
  2880.     DirGetRecordMetaInfoPB                getRecordMetaInfoPB;
  2881.     DirGetDNodeMetaInfoPB                getDNodeMetaInfoPB;
  2882.     DirGetDirectoryInfoPB                getDirectoryInfoPB;
  2883.  
  2884.     DirGetDNodeAccessControlGetPB        getDNodeAccessControlGetPB;
  2885.     DirGetDNodeAccessControlParsePB        getDNodeAccessControlParsePB;
  2886.  
  2887.     DirGetRecordAccessControlGetPB        getRecordAccessControlGetPB;
  2888.     DirGetRecordAccessControlParsePB    getRecordAccessControlParsePB;
  2889.     
  2890.     DirGetAttributeAccessControlGetPB    getAttributeAccessControlGetPB;
  2891.     DirGetAttributeAccessControlParsePB    getAttributeAccessControlParsePB;
  2892.  
  2893.  
  2894.     DirEnumerateDirectoriesGetPB        enumerateDirectoriesGetPB;
  2895.     DirEnumerateDirectoriesParsePB        enumerateDirectoriesParsePB;
  2896.  
  2897.     DirAddADAPDirectoryPB                addADAPDirectoryPB;
  2898.     DirRemoveDirectoryPB                removeDirectoryPB;
  2899.     DirNetSearchADAPDirectoriesGetPB    netSearchADAPDirectoriesGetPB;
  2900.     DirNetSearchADAPDirectoriesParsePB    netSearchADAPDirectoriesParsePB;
  2901.     DirFindADAPDirectoryByNetSearchPB    findADAPDirectoryByNetSearchPB;
  2902.  
  2903.  
  2904.     DirMapDNodeNumberToPathNamePB        mapDNodeNumberToPathNamePB;
  2905.     DirMapPathNameToDNodeNumberPB        mapPathNameToDNodeNumberPB;
  2906.     DirGetLocalNetworkSpecPB            getLocalNetworkSpecPB;
  2907.     DirGetDNodeInfoPB                    getDNodeInfoPB;
  2908.  
  2909. /* Calls For Personal Catalogs */
  2910.     DirCreatePersonalDirectoryPB        createPersonalDirectoryPB;
  2911.     DirOpenPersonalDirectoryPB            openPersonalDirectoryPB;
  2912.     DirClosePersonalDirectoryPB            closePersonalDirectoryPB;
  2913.     DirMakePersonalDirectoryRLIPB        makePersonalDirectoryRLIPB;
  2914.  
  2915. /* Calls For CSAM's */
  2916.  
  2917.     DirAddDSAMPB                        addDSAMPB;
  2918.     DirInstantiateDSAMPB                instantiateDSAMPB;
  2919.     DirRemoveDSAMPB                        removeDSAMPB;
  2920.     DirAddDSAMDirectoryPB                addDSAMDirectoryPB;
  2921.     DirGetExtendedDirectoriesInfoPB        getExtendedDirectoriesInfoPB;
  2922.     DirGetDirectoryIconPB                getDirectoryIconPB;
  2923.  
  2924. /* Call to dsRefNum for System(OCE Setup) Personal Catalog */
  2925.     DirGetOCESetupRefNumPB                dirGetOCESetupRefNumPB;
  2926.  
  2927. /* Abort a aysnchronous call */
  2928.     DirAbortPB                            abortPB;
  2929. };
  2930.  
  2931. typedef union DirParamBlock DirParamBlock;
  2932. typedef DirParamBlock *DirParamBlockPtr;
  2933.  
  2934. typedef pascal OSErr (*DSAMDirProc) (Ptr dsamData, DirParamBlockPtr paramBlock, Boolean async);
  2935. typedef pascal OSErr (*DSAMDirParseProc) (Ptr dsamData, DirParamBlockPtr paramBlock, Boolean async);
  2936. typedef pascal OSErr (*DSAMAuthProc) (Ptr dsamData, AuthParamBlockPtr pb, Boolean async);
  2937.  
  2938.  
  2939.  
  2940. /*************************************************************/
  2941. /*
  2942. These are the selector values used after the trap dispatch to determine just
  2943. what call the client made to my toolbox.  These bear no relationship to the
  2944. procedure numbers used in the client-to-server protocol.
  2945. */
  2946.  
  2947. /* Note:  0x21C, 0x21D are used internally
  2948.  */
  2949.  
  2950.  
  2951. #define kAuthBindSpecificIdentity            0x200
  2952. #define kAuthUnbindSpecificIdentity            0x201
  2953. #define kAuthResolveCreationID                0x202
  2954. #define kAuthGetSpecificIdentityInfo        0x203
  2955. #define kAuthGetLocalIdentity                0x204
  2956.  
  2957. #define kAuthAddToLocalIdentityQueue        0x205
  2958. #define kAuthRemoveFromLocalIdentityQueue    0x206
  2959.  
  2960. #define kAuthAddKey                            0x207
  2961. #define kAuthChangeKey                        0x208
  2962. #define kAuthDeleteKey                        0x209
  2963. #define kAuthPasswordToKey                    0x20A
  2964.  
  2965. #define kAuthGetCredentials                    0x20B
  2966. #define kAuthDecryptCredentials                0x20C
  2967.  
  2968. #define kOCESetupRemoveDirectoryInfo        0x20D
  2969. #define kOCESetupGetDirectoryInfo            0x20E
  2970.  
  2971. #define kAuthMakeChallenge                    0x20F
  2972. #define kAuthMakeReply                        0x210
  2973. #define kAuthVerifyReply                    0x211
  2974. #define kAuthMakeProxy                        0x212
  2975. #define kAuthTradeProxyForCredentials        0x213
  2976.  
  2977. #define kAuthUnlockLocalIdentity            0x214
  2978. #define kAuthLockLocalIdentity                0x215
  2979. #define kAuthSetupLocalIdentity                0x216
  2980.  
  2981. #define kAuthChangeLocalIdentity            0x217
  2982. #define kAuthRemoveLocalIdentity            0x218
  2983. #define kOCESetupAddDirectoryInfo            0x219
  2984.  
  2985. #define kAuthGetUTCTime                        0x21A
  2986.  
  2987. #define kOCESetupChangeDirectoryInfo        0x21B
  2988.  
  2989. /* 0x100 is used as private command */
  2990.  
  2991.  
  2992. #define kDirEnumerateParse                    0x101
  2993. #define kDirLookupParse                        0x102
  2994.  
  2995. #define kDirEnumerateAttributeTypesParse    0x103
  2996. #define kDirEnumeratePseudonymParse            0x104
  2997. #define kDirNetSearchADAPDirectoriesParse    0x105
  2998. #define kDirEnumerateDirectoriesParse        0x106
  2999.  
  3000. #define kDirFindADAPDirectoryByNetSearch    0x107
  3001. #define kDirNetSearchADAPDirectoriesGet        0x108
  3002.  
  3003. #define kDirAddRecord                        0x109
  3004. #define kDirDeleteRecord                    0x10A
  3005. #define kDirAddAttributeValue                0x10B
  3006. #define kDirDeleteAttributeValue            0x10C
  3007. #define kDirChangeAttributeValue            0x10D
  3008. #define kDirVerifyAttributeValue            0x10E
  3009. #define kDirAddPseudonym                    0x10F
  3010. #define kDirDeletePseudonym                    0x110
  3011. #define kDirEnumerateGet                    0x111
  3012. #define kDirEnumerateAttributeTypesGet        0x112
  3013. #define kDirEnumeratePseudonymGet            0x113
  3014. #define kDirGetNameAndType                    0x114
  3015. #define kDirSetNameAndType                    0x115
  3016.  
  3017. #define kDirGetRecordMetaInfo                0x116
  3018. #define kDirLookupGet                        0x117
  3019.  
  3020. #define kDirGetDNodeMetaInfo                0x118
  3021. #define kDirGetDirectoryInfo                0x119
  3022. #define kDirEnumerateDirectoriesGet            0x11A
  3023.  
  3024. #define kDirAbort                            0x11B
  3025. #define kDirAddAlias                        0x11C
  3026.  
  3027.  
  3028. #define kDirAddDSAM                            0x11D
  3029. #define kDirOpenPersonalDirectory            0x11E
  3030. #define kDirCreatePersonalDirectory            0x11F
  3031. #define kDirRemoveDSAM                        0x120
  3032. #define kDirGetDirectoryIcon                0x121
  3033.  
  3034. #define kDirMapPathNameToDNodeNumber        0x122
  3035. #define kDirMapDNodeNumberToPathName        0x123
  3036.  
  3037. #define kDirGetLocalNetworkSpec                0x124
  3038. #define kDirGetDNodeInfo                    0x125
  3039. #define kDirFindValue                        0x126
  3040. #define kDirInstantiateDSAM                    0x127
  3041. #define kDirGetOCESetupRefNum                0x128
  3042.  
  3043. #define kDirGetDNodeAccessControlGet        0x12A
  3044. #define kDirGetRecordAccessControlGet        0x12C
  3045. #define kDirGetAttributeAccessControlGet    0x12E
  3046. #define kDirGetDNodeAccessControlParse        0x12F
  3047. #define kDirDeleteAttributeType                0x130
  3048.  
  3049. #define kDirClosePersonalDirectory            0x131
  3050. #define kDirMakePersonalDirectoryRLI        0x132
  3051.  
  3052. #define kDirAddDSAMDirectory                0x133
  3053. #define kDirGetRecordAccessControlParse        0x134
  3054. #define kDirRemoveDirectory                    0x135
  3055. #define kDirGetExtendedDirectoriesInfo        0x136
  3056.  
  3057. #define kDirAddADAPDirectory                0x137
  3058. #define kDirGetAttributeAccessControlParse    0x138
  3059.  
  3060. #define kDirFindRecordGet                    0x140
  3061. #define kDirFindRecordParse                    0x141
  3062.  
  3063. #ifdef __cplusplus
  3064. extern "C" {
  3065. #endif
  3066.  
  3067. pascal OSErr AuthBindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3068.     = {0x3F3C, kAuthBindSpecificIdentity, _oceTBDispatch};
  3069. pascal OSErr AuthUnbindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3070.     = {0x3F3C, kAuthUnbindSpecificIdentity, _oceTBDispatch};
  3071. pascal OSErr AuthResolveCreationID(AuthParamBlockPtr paramBlock, Boolean async)
  3072.     = {0x3F3C, kAuthResolveCreationID, _oceTBDispatch};
  3073. pascal OSErr AuthGetSpecificIdentityInfo(AuthParamBlockPtr paramBlock, Boolean async)
  3074.     = {0x3F3C, kAuthGetSpecificIdentityInfo, _oceTBDispatch};
  3075.  
  3076. pascal OSErr AuthAddKey(AuthParamBlockPtr paramBlock, Boolean async)
  3077.     = {0x3F3C, kAuthAddKey, _oceTBDispatch};
  3078. pascal OSErr AuthChangeKey(AuthParamBlockPtr paramBlock, Boolean async)
  3079.     = {0x3F3C, kAuthChangeKey, _oceTBDispatch};
  3080. pascal OSErr AuthDeleteKey(AuthParamBlockPtr paramBlock, Boolean async)
  3081.     = {0x3F3C, kAuthDeleteKey, _oceTBDispatch};
  3082. pascal OSErr AuthPasswordToKey(AuthParamBlockPtr paramBlock, Boolean async)
  3083.     = {0x3F3C, kAuthPasswordToKey, _oceTBDispatch};
  3084.  
  3085. pascal OSErr AuthGetCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  3086.     = {0x3F3C, kAuthGetCredentials, _oceTBDispatch};
  3087. pascal OSErr AuthDecryptCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  3088.     = {0x3F3C, kAuthDecryptCredentials, _oceTBDispatch};
  3089.  
  3090. pascal OSErr AuthMakeChallenge(AuthParamBlockPtr paramBlock, Boolean async)
  3091.     = {0x3F3C, kAuthMakeChallenge, _oceTBDispatch};
  3092. pascal OSErr AuthMakeReply(AuthParamBlockPtr paramBlock, Boolean async)
  3093.     = {0x3F3C, kAuthMakeReply, _oceTBDispatch};
  3094. pascal OSErr AuthVerifyReply(AuthParamBlockPtr paramBlock, Boolean async)
  3095.     = {0x3F3C, kAuthVerifyReply, _oceTBDispatch};
  3096.  
  3097. pascal OSErr AuthGetUTCTime(AuthParamBlockPtr paramBlock, Boolean async)
  3098.     = {0x3F3C, kAuthGetUTCTime, _oceTBDispatch};
  3099.  
  3100. pascal OSErr AuthMakeProxy(AuthParamBlockPtr paramBlock, Boolean async)
  3101.     = {0x3F3C, kAuthMakeProxy, _oceTBDispatch};
  3102.  
  3103. pascal OSErr AuthTradeProxyForCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  3104.     = {0x3F3C, kAuthTradeProxyForCredentials, _oceTBDispatch};
  3105.  
  3106. /* Local Identity API */
  3107. pascal OSErr AuthGetLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3108.     = {0x3F3C, kAuthGetLocalIdentity, _oceTBDispatch};
  3109.  
  3110. pascal OSErr AuthUnlockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3111.     = {0x3F3C, kAuthUnlockLocalIdentity, _oceTBDispatch};
  3112.  
  3113. pascal OSErr AuthLockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3114.     = {0x3F3C, kAuthLockLocalIdentity, _oceTBDispatch};
  3115.  
  3116. pascal OSErr AuthAddToLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  3117.     = {0x3F3C, kAuthAddToLocalIdentityQueue, _oceTBDispatch};
  3118.  
  3119. pascal OSErr AuthRemoveFromLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  3120.     = {0x3F3C, kAuthRemoveFromLocalIdentityQueue, _oceTBDispatch};
  3121.  
  3122. pascal OSErr AuthSetupLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3123.     = {0x3F3C, kAuthSetupLocalIdentity, _oceTBDispatch};
  3124.  
  3125. pascal OSErr AuthChangeLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3126.     = {0x3F3C, kAuthChangeLocalIdentity, _oceTBDispatch};
  3127.  
  3128. pascal OSErr AuthRemoveLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  3129.     = {0x3F3C, kAuthRemoveLocalIdentity, _oceTBDispatch};
  3130.  
  3131. pascal OSErr OCESetupAddDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  3132.     = {0x3F3C, kOCESetupAddDirectoryInfo, _oceTBDispatch};
  3133.  
  3134. pascal OSErr OCESetupChangeDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  3135.     = {0x3F3C, kOCESetupChangeDirectoryInfo, _oceTBDispatch};
  3136.  
  3137. pascal OSErr OCESetupRemoveDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  3138.     = {0x3F3C, kOCESetupRemoveDirectoryInfo, _oceTBDispatch};
  3139.  
  3140. pascal OSErr OCESetupGetDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  3141.     = {0x3F3C, kOCESetupGetDirectoryInfo, _oceTBDispatch};
  3142.  
  3143.  
  3144.  
  3145. pascal OSErr DirAddRecord(DirParamBlockPtr paramBlock, Boolean async)
  3146.     = {0x3F3C, kDirAddRecord, _oceTBDispatch};
  3147.  
  3148. pascal OSErr DirDeleteRecord(DirParamBlockPtr paramBlock, Boolean async)
  3149.     = {0x3F3C, kDirDeleteRecord, _oceTBDispatch};
  3150.  
  3151. pascal OSErr DirEnumerateGet(DirParamBlockPtr paramBlock, Boolean async)
  3152.     = {0x3F3C, kDirEnumerateGet, _oceTBDispatch};
  3153.  
  3154. pascal OSErr DirEnumerateParse(DirParamBlockPtr paramBlock, Boolean async)
  3155.     = {0x3F3C, kDirEnumerateParse, _oceTBDispatch};
  3156.  
  3157. pascal OSErr DirFindRecordGet(DirParamBlockPtr paramBlock, Boolean async)
  3158.     = {0x3F3C, kDirFindRecordGet, _oceTBDispatch};
  3159.  
  3160. pascal OSErr DirFindRecordParse(DirParamBlockPtr paramBlock, Boolean async)
  3161.     = {0x3F3C, kDirFindRecordParse, _oceTBDispatch};
  3162.  
  3163. pascal OSErr DirLookupGet(DirParamBlockPtr paramBlock, Boolean async)
  3164.     = {0x3F3C, kDirLookupGet, _oceTBDispatch};
  3165.  
  3166. pascal OSErr DirLookupParse(DirParamBlockPtr paramBlock, Boolean async)
  3167.     = {0x3F3C, kDirLookupParse, _oceTBDispatch};
  3168.  
  3169. pascal OSErr DirAddAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  3170.     = {0x3F3C, kDirAddAttributeValue, _oceTBDispatch};
  3171.  
  3172. pascal OSErr DirDeleteAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  3173.     = {0x3F3C, kDirDeleteAttributeValue, _oceTBDispatch};
  3174.  
  3175. pascal OSErr DirDeleteAttributeType(DirParamBlockPtr paramBlock, Boolean async)
  3176.     = {0x3F3C, kDirDeleteAttributeType, _oceTBDispatch};
  3177.  
  3178. pascal OSErr DirChangeAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  3179.     = {0x3F3C, kDirChangeAttributeValue, _oceTBDispatch};
  3180.  
  3181. pascal OSErr DirVerifyAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  3182.     = {0x3F3C, kDirVerifyAttributeValue, _oceTBDispatch};
  3183.  
  3184. pascal OSErr DirFindValue(DirParamBlockPtr paramBlock, Boolean async)
  3185.     = {0x3F3C, kDirFindValue, _oceTBDispatch};
  3186.  
  3187. pascal OSErr DirEnumerateAttributeTypesGet(DirParamBlockPtr paramBlock, Boolean async)
  3188.     = {0x3F3C, kDirEnumerateAttributeTypesGet, _oceTBDispatch};
  3189.  
  3190. pascal OSErr DirEnumerateAttributeTypesParse(DirParamBlockPtr paramBlock, Boolean async)
  3191.     = {0x3F3C, kDirEnumerateAttributeTypesParse, _oceTBDispatch};
  3192.  
  3193. pascal OSErr DirAddPseudonym(DirParamBlockPtr paramBlock, Boolean async)
  3194.     = {0x3F3C, kDirAddPseudonym, _oceTBDispatch};
  3195.  
  3196. pascal OSErr DirDeletePseudonym(DirParamBlockPtr paramBlock, Boolean async)
  3197.     = {0x3F3C, kDirDeletePseudonym, _oceTBDispatch};
  3198.  
  3199. pascal OSErr DirAddAlias(DirParamBlockPtr paramBlock, Boolean async)
  3200.     = {0x3F3C, kDirAddAlias, _oceTBDispatch};
  3201.  
  3202. pascal OSErr DirEnumeratePseudonymGet(DirParamBlockPtr paramBlock, Boolean async)
  3203.     = {0x3F3C, kDirEnumeratePseudonymGet, _oceTBDispatch};
  3204.  
  3205. pascal OSErr DirEnumeratePseudonymParse(DirParamBlockPtr paramBlock, Boolean async)
  3206.     = {0x3F3C, kDirEnumeratePseudonymParse, _oceTBDispatch};
  3207.  
  3208. pascal OSErr DirGetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  3209.     = {0x3F3C, kDirGetNameAndType, _oceTBDispatch};
  3210.  
  3211. pascal OSErr DirSetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  3212.     = {0x3F3C, kDirSetNameAndType, _oceTBDispatch};
  3213.  
  3214. pascal OSErr DirGetRecordMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  3215.     = {0x3F3C, kDirGetRecordMetaInfo, _oceTBDispatch};
  3216.  
  3217. pascal OSErr DirGetDNodeMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  3218.     = {0x3F3C, kDirGetDNodeMetaInfo, _oceTBDispatch};
  3219.  
  3220. pascal OSErr DirGetDirectoryInfo(DirParamBlockPtr paramBlock, Boolean async)
  3221.     = {0x3F3C, kDirGetDirectoryInfo, _oceTBDispatch};
  3222.  
  3223. pascal OSErr DirGetDNodeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  3224.     = {0x3F3C, kDirGetDNodeAccessControlGet, _oceTBDispatch};
  3225.  
  3226. pascal OSErr DirGetDNodeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  3227.     = {0x3F3C, kDirGetDNodeAccessControlParse, _oceTBDispatch};
  3228.  
  3229. pascal OSErr DirGetRecordAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  3230.     = {0x3F3C, kDirGetRecordAccessControlGet, _oceTBDispatch};
  3231.  
  3232. pascal OSErr DirGetRecordAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  3233.     = {0x3F3C, kDirGetRecordAccessControlParse, _oceTBDispatch};
  3234.  
  3235. pascal OSErr DirGetAttributeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  3236.     = {0x3F3C, kDirGetAttributeAccessControlGet, _oceTBDispatch};
  3237.  
  3238. pascal OSErr DirGetAttributeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  3239.     = {0x3F3C, kDirGetAttributeAccessControlParse, _oceTBDispatch};
  3240.  
  3241. pascal OSErr DirEnumerateDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  3242.     = {0x3F3C, kDirEnumerateDirectoriesGet, _oceTBDispatch};
  3243.  
  3244. pascal OSErr DirEnumerateDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  3245.     = {0x3F3C, kDirEnumerateDirectoriesParse, _oceTBDispatch};
  3246.  
  3247. pascal OSErr DirMapPathNameToDNodeNumber(DirParamBlockPtr paramBlock, Boolean async)
  3248.     = {0x3F3C, kDirMapPathNameToDNodeNumber, _oceTBDispatch};
  3249.  
  3250. pascal OSErr DirMapDNodeNumberToPathName(DirParamBlockPtr paramBlock, Boolean async)
  3251.     = {0x3F3C, kDirMapDNodeNumberToPathName, _oceTBDispatch};
  3252.  
  3253.  
  3254. pascal OSErr DirGetLocalNetworkSpec(DirParamBlockPtr paramBlock, Boolean async)
  3255.     = {0x3F3C, kDirGetLocalNetworkSpec, _oceTBDispatch};
  3256.  
  3257. pascal OSErr DirGetDNodeInfo(DirParamBlockPtr paramBlock, Boolean async)
  3258.     = {0x3F3C, kDirGetDNodeInfo, _oceTBDispatch};
  3259.  
  3260.  
  3261. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  3262.  
  3263. pascal OSErr DirCreatePersonalDirectory(DirParamBlockPtr paramBlock)
  3264.     = {0x7000, 0x1f00, 0x3F3C, kDirCreatePersonalDirectory, _oceTBDispatch};
  3265.  
  3266. pascal OSErr DirOpenPersonalDirectory(DirParamBlockPtr paramBlock)
  3267.     = {0x7000, 0x1f00, 0x3F3C, kDirOpenPersonalDirectory, _oceTBDispatch};
  3268.  
  3269. pascal OSErr DirClosePersonalDirectory(DirParamBlockPtr paramBlock)
  3270.     = {0x7000, 0x1f00, 0x3F3C, kDirClosePersonalDirectory, _oceTBDispatch};
  3271.  
  3272. pascal OSErr DirMakePersonalDirectoryRLI(DirParamBlockPtr paramBlock)
  3273.     = {0x7000, 0x1f00, 0x3F3C, kDirMakePersonalDirectoryRLI, _oceTBDispatch};
  3274.  
  3275. pascal OSErr DirAddDSAM(DirParamBlockPtr paramBlock)
  3276.     = {0x7000, 0x1f00, 0x3F3C, kDirAddDSAM, _oceTBDispatch};
  3277.  
  3278. pascal OSErr DirInstantiateDSAM(DirParamBlockPtr paramBlock)
  3279.     = {0x7000, 0x1f00, 0x3F3C, kDirInstantiateDSAM, _oceTBDispatch};
  3280.  
  3281.  
  3282. pascal OSErr DirRemoveDSAM(DirParamBlockPtr paramBlock)
  3283.     = {0x7000, 0x1f00, 0x3F3C, kDirRemoveDSAM, _oceTBDispatch};
  3284.  
  3285. pascal OSErr DirAddDSAMDirectory(DirParamBlockPtr paramBlock, Boolean async)
  3286.     = {0x3F3C, kDirAddDSAMDirectory, _oceTBDispatch};
  3287.  
  3288. pascal OSErr DirGetExtendedDirectoriesInfo(DirParamBlockPtr paramBlock, Boolean async)
  3289.     = {0x3F3C, kDirGetExtendedDirectoriesInfo, _oceTBDispatch};
  3290.  
  3291. pascal OSErr DirGetDirectoryIcon(DirParamBlockPtr paramBlock, Boolean async)
  3292.     = {0x3F3C, kDirGetDirectoryIcon, _oceTBDispatch};
  3293.  
  3294.  
  3295. pascal OSErr DirAddADAPDirectory(DirParamBlockPtr paramBlock, Boolean async)
  3296.     = {0x3F3C, kDirAddADAPDirectory, _oceTBDispatch};
  3297.  
  3298. pascal OSErr DirRemoveDirectory(DirParamBlockPtr paramBlock, Boolean async)
  3299.     = {0x3F3C, kDirRemoveDirectory, _oceTBDispatch};
  3300.  
  3301. pascal OSErr DirNetSearchADAPDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  3302.     = {0x3F3C, kDirNetSearchADAPDirectoriesGet, _oceTBDispatch};
  3303.  
  3304. pascal OSErr DirNetSearchADAPDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  3305.     = {0x3F3C, kDirNetSearchADAPDirectoriesParse, _oceTBDispatch};
  3306.  
  3307. pascal OSErr DirFindADAPDirectoryByNetSearch(DirParamBlockPtr paramBlock, Boolean async)
  3308.     = {0x3F3C, kDirFindADAPDirectoryByNetSearch, _oceTBDispatch};
  3309.  
  3310. pascal OSErr DirGetOCESetupRefNum(DirParamBlockPtr paramBlock, Boolean async)
  3311.     = {0x3F3C, kDirGetOCESetupRefNum, _oceTBDispatch};
  3312.  
  3313. pascal OSErr DirAbort(DirParamBlockPtr paramBlock)
  3314.     = {0x7000, 0x1f00, 0x3F3C, kDirAbort, _oceTBDispatch};
  3315.  
  3316.  
  3317.  
  3318. #ifdef __cplusplus
  3319. }
  3320. #endif
  3321.  
  3322.  
  3323.  
  3324. #endif
  3325.